question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Secure cookies over reverse proxy with https

See original GitHub issue

Feature 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:19 (17 by maintainers)

github_iconTop GitHub Comments

2reactions
MadeByMikecommented, Nov 5, 2019

Yep I hit this problem as well 👍

2reactions
jesstelfordcommented, Nov 2, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found