Secure cookies over reverse proxy with https
See original GitHub issueFeature request
Actually, it’s not possible to set secure cookies over reverse proxy with https.
Is your feature request related to a problem? Please describe.
As mentioned on this issue https://github.com/keystonejs/keystone/issues/1842#issuecomment-548743146, app is not able to set a secure cookie when there is a proxy.
Describe the solution you’d like
I’m not sure, I think if we enabled proxy: true
on this file https://github.com/keystonejs/keystone/blob/master/packages/session/lib/session.js#L54, it should work.
Describe alternatives you’ve considered
Nothing else at the moment …
Additional context
It was tested with Heroku.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:19 (17 by maintainers)
Top Results From Across the Web
Using secure sessions behind an HTTP proxy - GoSquared Blog
GoSquared is served entirely via HTTPS, so it was a logical and easy decision to modify our user sessions to use secure cookies....
Read more >In nginx reverse proxy, how to set the secure flag for cookies?
I'm using nginx as a reverse proxy to serve a https-only site. So I want the cookies for this site flagged as secure....
Read more >Secure cookies with reverse proxy - No Fluff Web
To mark cookies as secure server must work on HTTPS, in case reverse proxy accepts requests on HTTPS and then forwards to back-end...
Read more >How to Implement HTTPOnly and Secure Cookie in Nginx?
By using “add_header” directive. An easy way to set cookie flag as HTTPOnly and Secure in Set-Cookie HTTP response header. · By using...
Read more >Using Nginx reverse-proxy to set cross-site cookies for your ...
Chrome now requires the SameSite attribute to be set with both None and Secure labels. The Secure label forces the cookie to be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep I hit this problem as well 👍
I’ve started running into this problem over the weekend also for my deployments to now.sh. Interestingly, this has only started happening recently after an upgrade to latest versions of Keystone. Haven’t had time to track down what changed yet.