🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(auth): strict no-cache response headers (#2814)
Marc Klingen6b3630f3c2a4
diff --git a/web/src/pages/api/auth/[...nextauth].ts b/web/src/pages/api/auth/[...nextauth].tsindex 93df6f12da..6f70a46bde 100644--- a/web/src/pages/api/auth/[...nextauth].ts+++ b/web/src/pages/api/auth/[...nextauth].ts@@ -8,6 +8,11 @@ export default async function auth(req: NextApiRequest, res: NextApiResponse) {// https://github.com/nextauthjs/next-auth/issues/2408#issuecomment-1382629234// for api routes, we need to call the headers in the api route itself// disable caching for anything auth related- res.setHeader("Cache-Control", "no-store, max-age=0");+ res.setHeader(+ "Cache-Control",+ "no-store, no-cache, must-revalidate, proxy-revalidate",+ );+ res.setHeader("Pragma", "no-cache");+ res.setHeader("Expires", "0");return await NextAuth(req, res, authOptions);}