Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mcpjam-inspector/server/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ export function createHonoApp() {
return c.json({ status: "ok", timestamp: new Date().toISOString() });
});

// Guest JWT JWKS endpoint — public, cacheable, no auth required.
// Guest JWT JWKS endpoint — public, no auth required, avoid edge caching.
// Convex uses this to verify guest JWTs natively.
app.get("/guest/jwks", (c) => {
c.header("Cache-Control", "public, max-age=3600");
c.header("Cache-Control", "no-store");
return c.json(getGuestJwks());
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ describe("GET /api/web/guest-jwks", () => {
rmSync(testGuestKeyDir, { recursive: true, force: true });
});

it("returns a public, cacheable JWKS document", async () => {
it("returns a non-cacheable JWKS document", async () => {
const response = await app.request("/api/web/guest-jwks");

expect(response.status).toBe(200);
expect(response.headers.get("cache-control")).toBe("public, max-age=3600");
expect(response.headers.get("cache-control")).toBe("no-store");
expect(response.headers.get("content-type")).toContain("application/json");

const body = await response.json();
Expand Down
2 changes: 1 addition & 1 deletion mcpjam-inspector/server/routes/web/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ web.route("/guest-session", guestSession);

// Public JWKS endpoint for guest JWT verification.
web.get("/guest-jwks", (c) => {
c.header("Cache-Control", "public, max-age=3600");
c.header("Cache-Control", "no-store");
return c.json(getGuestJwks());
});

Expand Down
Loading