Replies: 1 comment
-
You can't do anything more on the server. If you perform a Let's say that you have a page A which fetches some information client-side from resource B ( Such "non-navigation request causing navigation on redirect", could also be used for malicious purposes. When responding to some requests a malicious API could, instead of responding with real/fake data, cause a navigation to a phising page. If you want to cause a navigation, then the best way, would be returining a special response with URL that is understood by the client (JS on the website) as requiring navigation. You can also do this by instructing |
Beta Was this translation helpful? Give feedback.
-
Usage
if the request type is xhr/Redirect
this didn't redirect user to the target page, only triggered two more endpoints(the second and the third) calling. wondering if we can do anything else in expressjs server side to redirect user to the target page except for adding extra codes in client side(e.g. use
window.location.href = response.headers.location
in axios response interceptors)if the request type is document
this redirect user to the target page
Beta Was this translation helpful? Give feedback.
All reactions