-
Notifications
You must be signed in to change notification settings - Fork 858
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
secure: false does not remove cookies secure -flag #237
Comments
The Option doesn't apply to cookies, only the secure connection:
There is a feature request on their issue tracker for this: http-party/node-http-proxy#1165 |
Issue has gone stale; Closing issue. |
thanks! your workaround helps me a lot |
Thanks @villesau . This is still a valid issue. I need this work around to proxy from http to https using a common react-create-app configuration. Can you please reopen this issue? |
Unfortunately I'm not able to reopen this. It needs to be done by some maintainer, maybe @chimurai ? Although the base issue is in the other library.. |
Don't think it's wise to modify the behaviour of There is a thread for this issue: http-party/node-http-proxy#1165 imho, the ecosystem would benefit more if it is solved there. I'm open for suggestions. |
In my opinion... when I set changeOrigin: true, and I'm going from http://localhost:3000 to https://qa.api.com, it should just work.. But I had to dive deep into the http headers and eventually figured out the cookies weren't being set - then I dived deep into cookies and figured it's because the cookies have this secure; flag. So it's really an implementation detail - maybe there could be an option for patching the cookies - but I'm not sure what to call it - At the end of the day I guess it's as easy as just copy pasting these few lines to remove the secure flag: http-party/node-http-proxy#1165 (comment) |
For me, I'm using angular CLI with the proxy options, so the config is a JSON file in the project, providing the workaround function is not doable for me 😔 Edit: Well, I converted my config to |
Expected behavior
when
secure: false
, cookies secure flag should be automatically removedActual behavior
secure flag is not removed
Setup
proxy middleware configuration
There is a workaround for this by removing the secure flag manually like
but it takes time to figure out that the flag should be removed, and I expected secure:false to setup all this kind of stuff for me.
The text was updated successfully, but these errors were encountered: