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 <noreply@anthropic.com>
This commit is contained in:
parent
8e2cd0b0d6
commit
7911a32676
1 changed files with 3 additions and 0 deletions
|
|
@ -26,6 +26,9 @@ FROM base AS build
|
||||||
COPY --from=deps /app/node_modules ./node_modules
|
COPY --from=deps /app/node_modules ./node_modules
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=studio-build /app/dist ./public/studio
|
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_PROJECT_ID
|
||||||
ARG SANITY_DATASET=production
|
ARG SANITY_DATASET=production
|
||||||
ARG SANITY_API_TOKEN
|
ARG SANITY_API_TOKEN
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue