From 4776f53e9d79ed01679d1ba922fb8d92d23bcc14 Mon Sep 17 00:00:00 2001 From: Cian Hughes Date: Thu, 23 Jan 2025 16:28:47 +0000 Subject: [PATCH] More attempts to solve proxy path conflicts --- caddy/Caddyfile | 6 ++---- src/hooks.server.js | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/caddy/Caddyfile b/caddy/Caddyfile index 659be93..f0d0f03 100644 --- a/caddy/Caddyfile +++ b/caddy/Caddyfile @@ -10,10 +10,8 @@ health_status 200 } - handle /repo/* { - root * /var/www/html - try_files * /repo/placeholder.html - file_server + route /repo/* { + reverse_proxy localhost:1212 } } diff --git a/src/hooks.server.js b/src/hooks.server.js index aaec6e5..fbe1e61 100644 --- a/src/hooks.server.js +++ b/src/hooks.server.js @@ -4,7 +4,7 @@ export const handle = async ({ event, resolve }) => { if (proxyPaths.some(path => event.url.pathname.startsWith(path))) { // Return empty response, letting proxy handle it - return new Response(null, { status: 404 }); + return new Response(null, { status: 444 }); } // Let SvelteKit handle other paths