7b7adbdb34
Capture→Review uploads the calibrated lineup PNGs (clean cal + batch) as
multipart to /api/v1/slabs/{id}/photos. nginx's default 1MB
client_max_body_size 413s on real multi-MB photos, blocking the
Capture→Review transition. Allow 25m.
41 lines
1.3 KiB
Plaintext
41 lines
1.3 KiB
Plaintext
server {
|
|
listen 80;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Capture→Review uploads the calibrated lineup PNGs (clean cal + batch) as
|
|
# multipart to /api/v1/slabs/{id}/photos. nginx's default client_max_body_size
|
|
# is 1MB, which 413s on real multi-MB photos. Allow large photo bodies.
|
|
client_max_body_size 25m;
|
|
|
|
# Docker embedded DNS for service name resolution (fastapi)
|
|
resolver 127.0.0.11 valid=10s;
|
|
|
|
# SPA: fall back to index.html for any path
|
|
# Proxy API calls to the FastAPI backend (M3+)
|
|
# Use variable to defer DNS resolution (docker service name "fastapi")
|
|
location /api/ {
|
|
set $fastapi_upstream fastapi;
|
|
proxy_pass http://$fastapi_upstream:8000;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection 'upgrade';
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_cache_bypass $http_upgrade;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location ~* \.(js|css|png|jpg|jpeg|svg|woff2?)$ {
|
|
expires 7d;
|
|
add_header Cache-Control "public";
|
|
try_files $uri =404;
|
|
}
|
|
}
|