Force 404 on static folder when a file is not found (#1165)

This commit is contained in:
Charles Bochet 2023-08-10 21:17:40 +02:00 committed by GitHub
parent 07a8f68ef1
commit a12b6c4bda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -13,6 +13,8 @@ COPY ./front .
RUN yarn install
RUN yarn build
COPY ./infra/prod/front/serve.json ./build
FROM node:18.16.0-alpine as front
WORKDIR /app/front
@ -20,4 +22,4 @@ COPY --from=build /app/front/build ./build
RUN yarn global add serve
CMD ["serve", "-s", "build"]
CMD ["serve", "build"]

View File

@ -0,0 +1,6 @@
{
"rewrites": [
{ "source": "!static/**", "destination": "/index.html" }
],
"directoryListing": false
}