perf(html): replace proxyAuth with getToken to remove set-cookie; add Cache-Control per auth state
CI / check (push) Successful in 23s
CI / release (push) Skipped
CI / deploy (push) Successful in 1m20s

This commit is contained in:
openhands committed 2026-08-01 18:37:19 +02:00
1 parent 2799b63943
commit 7c1f8d709e
3 files changed
+28 -12

No files matched your search

+1
View File
@@ -1,4 +1,5 @@
export interface ProxyToken {
sub?: string;
rank?: unknown;
}
+4 -6
View File
@@ -2,14 +2,12 @@ import { readFileSync } from "node:fs";
import { describe, expect, it } from "vitest";
describe("proxy authentication boundary", () => {
it("uses a database-free Auth.js decoder", () => {
it("uses getToken directly without database-dependent Auth.js config", () => {
const proxy = readFileSync("src/proxy.ts", "utf8");
const proxyAuth = readFileSync("src/lib/proxy-auth.ts", "utf8");
expect(proxy).toContain('from "@/lib/proxy-auth"');
expect(proxy).not.toContain('from "@/lib/proxy-auth"');
expect(proxy).not.toContain('from "@/lib/auth"');
expect(proxyAuth).not.toMatch(
/from\s+["'][^"']*(db|site-settings|credentials|prisma)[^"']*["']/i,
);
expect(proxy).toContain("getToken");
expect(proxy).toContain("next-auth/jwt");
});
});