My main question is in bold at the bottom. I would love an answer to that especially but if you'd like to help me figure out the rest of the problem, please continue reading.
I am working on a web application whose session expiration is being handled by a Spring backend (it's the default Tomcat 30-minute session expiration). If you are logged into the application and then you type in 'www.myapplication.com/portal/logout' (not the real url, obv.) you are logged out and redirected to the login page. Great. However, if you set
window.location = 'http://www.myapplication.com/portal/logout'
in the client-side javascript, that url appears in the url bar in your browser but a whitelabel error page results which is being generated by another service on the backend.
Why is there a difference between typing the url versus setting window.location in the code? Should there be a difference? Or do you think this other service is funking with redirection? If so, why would the same error not occur when you type the url?
PS. I also tried window.location.href = url and window.location.replace(url), to the same effect.