-
Notifications
You must be signed in to change notification settings - Fork 2k
Jsessionid cookie won't retain in browser #993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm having trouble with the same issue, did you find a work around? The set-cookie header comes back with the JSESSIONID, but the browser doesnt retain it. |
Yes, the solution was just under my nose. It had nothing to do with inner-workings of node-http-proxy. In my case I was making a request from a localized domain (as depicted in OP) to another localized domain (but a different port of course, because by default Node server listens to all domains assigned to loop-back in your hosts file), which was the proxy server. The mistake was not making the request from the same localized domain (that of Express). So what happened is, the proxy returned the cookie and the browser retained under the proxy domain. To visualize the issue: |
Thanks! For anyone else who stumbles across this issue, I didn't have the same setup, -> http://localhost -> proxy -> https://realserver.com, In my case the cookie had the Secure flag, so although JSESSIONID was stored @localhost, it was not being sent in subsequent requests because I didnt use the https:// by setting the https property on the webpack-dev-server config. |
Hi,
I have the following setup:
Localhost Express (LAN machine #1) -> Localhost Proxy (LAN machine #1) -> Servlet (LAN machine #2).
Servlet is including a Jsessionid cookie in it's response header, which I'm able to modify and receive on the response header of Localhost Express, but for some reason won't store under browser resources. Any ideas?
Thanks.
The text was updated successfully, but these errors were encountered: