Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

feat(auth): scope cookies to path for custom BASE_PATH deployments (#6320)

Sebi8954cf0c8285
diff --git a/web/src/server/utils/cookies.ts b/web/src/server/utils/cookies.ts
index 5c3f48df03..e406548451 100644
--- a/web/src/server/utils/cookies.ts
+++ b/web/src/server/utils/cookies.ts
@@ -8,7 +8,7 @@ export const getCookieOptions = () => ({
domain: env.NEXTAUTH_COOKIE_DOMAIN ?? undefined,
httpOnly: true,
sameSite: "lax" as const,
- path: "/",
+ path: env.NEXT_PUBLIC_BASE_PATH || "/",
secure: shouldSecureCookies(),
});