302 redirect – This URL is client side even though it is in the http header to the server

On our app we are trying to setup redirection route > intended.

This should be possible? However, when we send ‘This URL’ it becomes client side and breaks the 302 redirect.

As the server already has the intended page from the http header, should ‘This URL’ not be server side?

If we go to /contacts?a=1&b=2 with user is logged out, we get a 302 to the login page as desired: /login?a=1&b=2 but not the page the user wanted to return to after login, if we send the intent=’This URL’ as a parameter with send more parameters, we get a 200 to the contacts page and then a redirect, meaning the page and data was sent to the client before login.

We understand Privacy rules stop data being shown on the page, but we are hoping there is a way to do intended route with a correct 302 redirect.

There isn’t really a need to send the entire ‘this url’ as a parameter. Why don’t you use a smaller parameter ie c=3. Once the user logs in on the login page, check the value of the parameter c and send the user to the right page accordingly.
From my understanding ‘This url’ is a client side action, and using it will force server-side redirections.
If you have more parameters you would like to send, you can send those as well.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.