39 lines
1.4 KiB
Nginx Configuration File
39 lines
1.4 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;
|
|
|
|
gzip on;
|
|
gzip_types text/css application/javascript application/json image/svg+xml;
|
|
gzip_min_length 1024;
|
|
|
|
location ~ ^/(api|imports|data|cacu|cama|tea|governance|reportes|health)(/|$) {
|
|
proxy_pass http://webapi:5000;
|
|
# The synthetic cohort token is supplied by the container environment,
|
|
# never by the browser. Override any client-supplied header.
|
|
proxy_set_header X-Cama-Cohort-Token "${CAMA_COHORT_ACCESS_TOKEN}";
|
|
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;
|
|
}
|
|
}
|