How to set more than one cookie with Azure Functions?
UPDATE: Set multiple cookies using the "cookies" property in an HTTP response object
Unfortunately, this is currently a bug (first brought up in this issue). This isn't ideal, but here is a workaround you can use for now (note the additional white space in the "Set-Cookie "):
context.res = {
status: 200,
headers: {
"Content-Type": "text/html",
"Set-Cookie": "a=b; Secure; httpOnly; Path=/",
"Set-Cookie ": "b=c="; Secure; httpOnly; Path=/",
"Cache-Control": "no-cache, no-store"
},
body:
'<HTML><BODY>RESPONSE</BODY></HTML>'
};
context.done();