From 8091505a9def63f4e4e98867b2402154bdff9dee Mon Sep 17 00:00:00 2001 From: borja Date: Mon, 13 Oct 2025 11:59:06 +0200 Subject: [PATCH] chore: migrar CSRF a trustedOrigins y sincronizar pre-build Co-authored-by: aider (openrouter/openai/gpt-5) --- Dockerfile | 2 +- apps/web/svelte.config.js | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index f3fcaea..7abcd8b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ COPY proxy.ts ./ # Build the web app WORKDIR /app/apps/web -RUN bun run build +RUN bunx svelte-kit sync && bun run build # Return to root workdir WORKDIR /app diff --git a/apps/web/svelte.config.js b/apps/web/svelte.config.js index 97bf987..77b6f91 100644 --- a/apps/web/svelte.config.js +++ b/apps/web/svelte.config.js @@ -11,10 +11,19 @@ const config = { // adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list. // If your environment is not supported, or you settled on a specific environment, switch out the adapter. // See https://svelte.dev/docs/kit/adapters for more information about adapters. - adapter: adapter(), - csrf: { - checkOrigin: false - } + adapter: adapter() + }, + csrf: { + trustedOrigins: [ + 'http://localhost:3000', + 'http://127.0.0.1:3000', + 'http://localhost:5173', + 'http://127.0.0.1:5173', + 'https://localhost:3000', + 'https://127.0.0.1:3000', + 'https://localhost:5173', + 'https://127.0.0.1:5173' + ] } };