From 3a9cd2bed9496973f3687827b8caf87d1e18d8a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Tue, 19 May 2026 19:11:10 +0200 Subject: [PATCH] Fix --- packages/server/src/http.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/http.ts b/packages/server/src/http.ts index 8cc3964..74cec5b 100644 --- a/packages/server/src/http.ts +++ b/packages/server/src/http.ts @@ -23,7 +23,7 @@ const makeProductionWebappRoute = Effect.fnUntraced(function*(route: HttpRouter. return HttpRouter.all(route, Effect.gen(function*() { const req = yield* HttpServerRequest.HttpServerRequest - const source = path.join(dist, req.url) + const source = path.join(dist, decodeURI(new URL(req.url, "http://localhost").pathname)) const exists = yield* fs.stat(source).pipe( Effect.andThen(stat => stat.type === "File"), Effect.catchAll(() => Effect.succeed(false)), @@ -32,7 +32,7 @@ const makeProductionWebappRoute = Effect.fnUntraced(function*(route: HttpRouter. return yield* HttpServerResponse.setHeader( yield* HttpServerResponse.file(exists ? source : path.join(dist, "index.html")), "Cache-Control", - `public, max-age=${Duration.toSeconds("365 days")}, immutable` + `public, max-age=${Duration.toSeconds("365 days")}, immutable`, ) })) })