Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kentbrew
Created January 10, 2011 22:57
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kentbrew/773646 to your computer and use it in GitHub Desktop.
Save kentbrew/773646 to your computer and use it in GitHub Desktop.
Setting multiple cookies (or whatever) per header with Node. Bonus: p3p line prevents IE from spazzing out.
response.writeHead(200, {
'p3p': ['policyref="http://foo.com/p3p.xml"', 'CP="OOO EEE OOH AH AHH"'],
'Set-Cookie': ['ting="tang; expires=0; path=/;"', 'wallawalla="bingbang; expires=123456789; path=/;"'],
'Content-Type': 'text/html'
});
@chickenCabbage
Copy link

Thanks!

@hgezim
Copy link

hgezim commented Jun 26, 2020

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment