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
{{ message }}
Make it possible to use 302 redirect with RedirectAsync #20
Currently HttpListenerResponse.RedirectAsync uses status code 301, Moved Permanently. This can cause unwanted behavoir because Google Chrome caches this.
Possible scenario:
You want to go to /users, but you have to be logged in, so you use RedirectAsync to go to /login. After you logged in you are redirected back to possibly /index or another page. What can happen now is that if you want to go to /login, you're automatically transferred to /index and the same with /users (getting transferred to /login).
If you use 302, Redirect this move will not be cached, doing the same as PHP.
Activity
StefH commentedon Feb 25, 2018
Currently it's hardcoded in the source code to use 301.
Would it be an option to make it possible to indicate yourself how redirects are handled? (By the construction from the listener maybe?)