From 7911a32676e7a3fbba0ddcbb3941683cae7432e1 Mon Sep 17 00:00:00 2001 From: Calum Muir Date: Sun, 7 Jun 2026 12:58:01 +0000 Subject: [PATCH] Remove studio index.html from static files to force SSR path rewriting Astro's static middleware was serving public/studio/index.html directly, bypassing the [...path].ts route that rewrites /static/ to /studio/static/. Deleting it makes all /studio requests go through the SSR rewrite. Co-Authored-By: Claude Sonnet 4.6 --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 3ddfec6..4059b4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,6 +26,9 @@ FROM base AS build COPY --from=deps /app/node_modules ./node_modules COPY . . COPY --from=studio-build /app/dist ./public/studio +# Remove index.html so /studio requests fall through to the SSR route, +# which rewrites /static/ asset paths to /studio/static/ before serving. +RUN rm -f ./public/studio/index.html ARG SANITY_PROJECT_ID ARG SANITY_DATASET=production ARG SANITY_API_TOKEN