From 337a8e92405bfcbde88d3a59e12a8863ad237fe3 Mon Sep 17 00:00:00 2001 From: le king fu Date: Sun, 15 Nov 2026 00:34:08 -0500 Subject: [PATCH] refactor(web): make the shared origin list read-only (#200) ALLOWED_ORIGINS was private to ws.ts; it is now exported by origin.ts and read by the routes too. Typed `readonly string[]`, so that no module can add an origin to it by mistake. Same two values, same behaviour. Co-Authored-By: Claude Fable 5.2 --- web/src/lib/origin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/lib/origin.ts b/web/src/lib/origin.ts index 4ed2d3f..814953b 100644 --- a/web/src/lib/origin.ts +++ b/web/src/lib/origin.ts @@ -8,7 +8,7 @@ // // No import here: server.ts bundles ws.ts, and this module with it, apart // from the Next routes (web/Dockerfile, esbuild). -export const ALLOWED_ORIGINS = [ +export const ALLOWED_ORIGINS: readonly string[] = [ 'https://liste.lacompagniemaximus.com', 'http://localhost:3000', ];