Archived
1
0

Set domain on cookie

This allows it to be used in subdomains.
This commit is contained in:
Asher 2020-03-23 12:48:10 -05:00
parent 13534fa0c0
commit 77ad73d579
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A

View File

@ -526,9 +526,12 @@ export class HttpServer {
"Set-Cookie": [ "Set-Cookie": [
`${payload.cookie.key}=${payload.cookie.value}`, `${payload.cookie.key}=${payload.cookie.value}`,
`Path=${normalize(payload.cookie.path || "/", true)}`, `Path=${normalize(payload.cookie.path || "/", true)}`,
request.headers.host ? `Domain=${request.headers.host}` : undefined,
// "HttpOnly", // "HttpOnly",
"SameSite=strict", "SameSite=strict",
].join(";"), ]
.filter((l) => !!l)
.join(";"),
} }
: {}), : {}),
...payload.headers, ...payload.headers,