Skip to content

Commit 120a3f2

Browse files
Digidaiclaude
andcommitted
fix: add Cache-Control: no-store to 401 session responses in index.ts
The session-unauth path in index.ts used Response.json with only CORS_HEADERS, bypassing the jsonResponse helper in handlers/keys.ts. Cache-Control was therefore missing on 401 responses. Add it explicitly on the fallthrough path. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 373e86f commit 120a3f2

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,13 @@ export default {
216216
if (!session) {
217217
return Response.json(
218218
{ error: "Unauthorized", message: "Valid session required" },
219-
{ status: 401, headers: CORS_HEADERS },
219+
{
220+
status: 401,
221+
headers: {
222+
...CORS_HEADERS,
223+
"Cache-Control": "no-store, private",
224+
},
225+
},
220226
);
221227
}
222228

0 commit comments

Comments
 (0)