Files
solar-pv-dashboard/frontend/nginx.conf
Mateusz Gruszczyński 6db6d2822e fix echart
2026-03-26 10:30:29 +01:00

45 lines
1.1 KiB
Nginx Configuration File

server {
listen 80;
server_name _;
server_tokens off;
root /usr/share/nginx/html;
index index.html;
location /assets/ {
expires 1y;
add_header Cache-Control "public, max-age=31536000, immutable" always;
try_files $uri =404;
}
location /api/ {
proxy_pass http://backend:8105;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
add_header Cache-Control "no-store, no-cache" always;
}
location = /health {
proxy_pass http://backend:8105/health;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
add_header Cache-Control "no-store, no-cache" always;
}
location = /index.html {
add_header Cache-Control "no-store, no-cache" always;
try_files $uri =404;
}
location / {
add_header Cache-Control "no-store, no-cache" always;
try_files $uri $uri/ /index.html;
}
}