fix: subpath

This commit is contained in:
2024-06-27 14:51:25 +02:00
parent e14a90ae90
commit 70df54b273
3 changed files with 4 additions and 22 deletions

View File

@ -15,5 +15,5 @@ RUN pnpm run build
FROM nginx:stable-alpine AS runner
WORKDIR /usr/share/nginx/html
COPY --from=builder /build/dist ./
COPY --from=builder /build/dist ./demo-account-create/
COPY nginx.conf /etc/nginx/nginx.conf

View File

@ -101,30 +101,12 @@ http {
add_header Content-Security-Policy "default-src 'self' http: https: ws: wss: data: blob: 'unsafe-inline'; frame-ancestors 'self';" always;
add_header Permissions-Policy "interest-cohort=()" always;
# . files
location ~ /\.(?!well-known) {
deny all;
}
# assume that everything else is handled by the application router, by injecting the index.html.
location / {
location /demo-account-create/ {
autoindex off;
expires off;
add_header Cache-Control "public, max-age=0, s-maxage=0, must-revalidate" always;
try_files $uri /index.html =404;
}
# favicon.ico
location = /favicon.ico {
log_not_found off;
access_log off;
}
# robots.txt
location = /robots.txt {
log_not_found off;
access_log off;
expires -1; # no-cache
try_files $uri /demo-account-create/index.html =404;
}
location = /health {

View File

@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"build": "vite build --base /demo-account-create/",
"preview": "vite preview"
},
"devDependencies": {