Files
WebApp/nginx.conf
T
Roberto Treviño Cervantes e6e6fb7210 preliminary release
2026-10-29 12:12:15 -06:00

32 lines
1.0 KiB
Nginx Configuration File

server {
listen 80;
server_name _;
root /usr/share/nginx/html;
# Files travel inside the import requests (multipart or base64 JSON):
# keep this above WebApi's WEBAPI_MAX_UPLOAD_MB (200 MB default) plus
# the ~33% base64 overhead.
client_max_body_size 270m;
location ~ ^/(api|imports|data|cacu|cama|tea|governance|reportes|health)(/|$) {
proxy_pass http://webapi:5000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# OCR over a stack of scanned pages takes a while.
proxy_read_timeout 600s;
}
# Bundles carry a content hash in their name; index.html doesn't, so it
# must be revalidated or browsers keep running the previous release.
location ~* \.(js|css)$ {
add_header Cache-Control "public, max-age=31536000, immutable";
try_files $uri =404;
}
location / {
add_header Cache-Control "no-cache";
try_files $uri $uri/ /index.html;
}
}