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