diff --git a/src/node/http.ts b/src/node/http.ts index dd25ec72f..a45bc73f6 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,