12
This commit is contained in:
parent
e8b25b21ef
commit
ada0be589f
2 changed files with 12 additions and 13 deletions
18
nginx.conf
18
nginx.conf
|
|
@ -1,19 +1,21 @@
|
|||
server {
|
||||
listen 80;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# This location must match the Traefik PathPrefix
|
||||
# 1. Handle the path Traefik is routing
|
||||
location /lab/data-dashboard/ {
|
||||
alias /usr/share/nginx/html/;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# Keep a root location for the Health Check
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
# 2. Add an explicit health check endpoint (returns 200 OK)
|
||||
location /health {
|
||||
return 200 'healthy';
|
||||
add_header Content-Type text/plain;
|
||||
}
|
||||
|
||||
gzip on;
|
||||
gzip_types text/css application/javascript application/json;
|
||||
# 3. Fallback for SPA routing
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
|
|
@ -2,9 +2,6 @@ import { defineConfig } from 'vite';
|
|||
import react from '@vitejs/plugin-react';
|
||||
|
||||
export default defineConfig({
|
||||
base: '/lab/data-dashboard/', // Essential: This fixes the asset 404s
|
||||
base: '/lab/data-dashboard/',
|
||||
plugins: [react()],
|
||||
worker: {
|
||||
format: 'es',
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Reference in a new issue