You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shortcuts (i.e. vers numbers or sigils) are currently implemented in the controller by generating redirects to the target URL, optionally including the URL fragment.
This works fine when the main browser window navigates to /query?q=〈shortcut〉, however, the AJAX solution for the search page implemented in faustedition/faust-web#583 appearently has no way to access the actual target URL including the fragment:
(a) using fetch(…, {redirect: 'auto'}) follows all redirects but the response does no longer include the fragment
(b) using fetch(…, {redirect: 'manual'}) (or error) is practically indistinguishable from a network error, header data is available.
A separate function that could be used from the controller could either generate the new URL in a simple non-redirect response or generate an error on a 'no shortcut' case especially for the AJAX search API while the /query endpoint could continue working in the same way as it does now.
The text was updated successfully, but these errors were encountered:
This works around the problem with the solution for #583 that we cannot
access the URL fragment returned by the redirect using JS API.
It can be replaced by a call to the shortcut API outlined in
faustedition/faust-gen-html#654 once that is
in place.
Shortcuts (i.e. vers numbers or sigils) are currently implemented in the controller by generating redirects to the target URL, optionally including the URL fragment.
This works fine when the main browser window navigates to
/query?q=〈shortcut〉
, however, the AJAX solution for the search page implemented in faustedition/faust-web#583 appearently has no way to access the actual target URL including the fragment:(a) using
fetch(…, {redirect: 'auto'})
follows all redirects but the response does no longer include the fragment(b) using
fetch(…, {redirect: 'manual'})
(or error) is practically indistinguishable from a network error, header data is available.A separate function that could be used from the controller could either generate the new URL in a simple non-redirect response or generate an error on a 'no shortcut' case especially for the AJAX search API while the
/query
endpoint could continue working in the same way as it does now.The text was updated successfully, but these errors were encountered: