unable to use secure cookies
See original GitHub issueI am trying to set secure cookies, it does not work at first try.
I am using
secret: sessionSecret,
resave: false,
saveUninitialized: true,
cookie: {
secure: true,
httpOnly: true,
domain: 'beintoo.net',
expires: expiryDate
}
I found function issecure
relying on req.connection.encrypted
here but it seems not supported anymore, see https://github.com/expressjs/express/issues/1864
Any hint?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:22 (10 by maintainers)
Top Results From Across the Web
Express-session Secure Cookies not working - Stack Overflow
When not using secure cookie true setting, my app user login works fine. When I enable secure cookies, the login appears to go...
Read more >Turn cookies on or off - Computer - Google Account Help
Under "Privacy and security," click Site settings. Click Cookies and ... If you can't use your Google Account and get a message that...
Read more >"The application is configured to use secure cookies" error ...
An error with message "The application is configured to use secure cookies. These cookies require the browser to issue the request over SSL ......
Read more >Using HTTP cookies - MDN Web Docs
Insecure sites (with http: in the URL) can't set cookies with the Secure attribute. However, don't assume that Secure prevents all access to ......
Read more >CA5383: Ensure use secure cookies in ASP.NET Core
Applications available over HTTPS must use secure cookies, which indicate to the browser that the cookie should only be transmitted using ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
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
Ah, should be able to get
proxy_set_header X-Forwarded-Proto https;
added in there and it should be good to go?I had some trouble with this as well. By turning on
cookie: { secure: true }
,proxy: true
,app.set('trust proxy', true)
, andproxy_set_header X-Forwarded-Proto $scheme;
in the nginx proxy, I’ve gotten HTTPS cookies to work.Here’s a snip of my app:
And my nginx configuration: