session icon indicating copy to clipboard operation
session copied to clipboard

"Can't set headers after they are sent to the client" in relation to express-session

Open mpgr04 opened this issue 5 years ago • 1 comments

Hi, I use express-session in my application. During the development process I set the secure option of the session cookie to false, because I don't use https locally.

But as soon as I set this option to true and want to use the application on my webserver which has https, the following error occurs: Can't set headers after they are sent to the client

However, this only occurs on the web server and not locally.

I have already checked my code to see if multiple responses are sent in one request, but this is not the case.

I am grateful for any help!

mpgr04 avatar Dec 09 '20 22:12 mpgr04

Hello, I'm sorry your issue sat without response. Most likely no one knew the answer off-hand. I can help, though I'm not sure either. Can you provide some way that we can reproduce the error and debug it?

dougwilson avatar Mar 27 '22 18:03 dougwilson