From f32a4ed0af2ee19e1a2190aca30d3d7b746a645b Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Thu, 23 Jan 2025 16:47:24 +0000 Subject: [PATCH] More attempts to solve routing issues --- src/hooks.server.js | 4 ++-- svelte.config.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hooks.server.js b/src/hooks.server.js index fbe1e61..951880a 100644 --- a/src/hooks.server.js +++ b/src/hooks.server.js @@ -3,8 +3,8 @@ export const handle = async ({ event, resolve }) => { const proxyPaths = ["/repo"]; if (proxyPaths.some(path => event.url.pathname.startsWith(path))) { - // Return empty response, letting proxy handle it - return new Response(null, { status: 444 }); + // completely skip sveltekit routing + return; } // Let SvelteKit handle other paths diff --git a/svelte.config.js b/svelte.config.js index 0e350f1..474606e 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -12,6 +12,7 @@ const config = { precompress: true, // Pre-compresses files polyfill: true }), + csrf: { checkOrigin: false }, prerender: { entries: ['*'], handleMissingId: 'warn'