Merge pull request #463 from zitadel/qa

fix: enfore secure cookie for production environments
This commit is contained in:
Max Peintner
2025-05-19 17:05:40 +02:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@@ -31,7 +31,8 @@ async function setSessionHttpOnlyCookie<T>(
value: JSON.stringify(sessions), value: JSON.stringify(sessions),
httpOnly: true, httpOnly: true,
path: "/", path: "/",
sameSite, sameSite: process.env.NODE_ENV === "production" ? sameSite : "lax",
secure: process.env.NODE_ENV === "production",
}); });
} }

View File

@@ -12,7 +12,8 @@
"ZITADEL_API_URL", "ZITADEL_API_URL",
"ZITADEL_SERVICE_USER_TOKEN", "ZITADEL_SERVICE_USER_TOKEN",
"NEXT_PUBLIC_BASE_PATH", "NEXT_PUBLIC_BASE_PATH",
"CUSTOM_REQUEST_HEADERS" "CUSTOM_REQUEST_HEADERS",
"NODE_ENV"
], ],
"tasks": { "tasks": {
"generate": { "generate": {