set cookie and redirect: Can't modify immutable headers.
I'm trying to set a session cookie and redirect with a 302 but appending the headers throws this exception:
Can't modify immutable headers.
TypeError: Can't modify immutable headers.
let res = Response.redirect(url.origin+"/my/",302);
res.headers.append("Set-Cookie", "sid=" + user.sid + "; Path=/; Secure; Max-Age=32000000; HttpOnly");
Can't modify immutable headers.
TypeError: Can't modify immutable headers.
let res = Response.redirect(url.origin+"/my/",302);
res.headers.append("Set-Cookie", "sid=" + user.sid + "; Path=/; Secure; Max-Age=32000000; HttpOnly");