mirror of https://github.com/coder/code-server.git
Set domain on cookie
This allows it to be used in subdomains.
This commit is contained in:
parent
13534fa0c0
commit
77ad73d579
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue