- Configure NestJS with an explicit JSON and urlencoded body parser limit controlled by API_BODY_LIMIT. - Set the default API body limit to 100mb for report HTML, key frames, template images, and Data URL file uploads. - Add a matching Nginx client_max_body_size 100m limit so Docker web proxy no longer rejects large report saves first. - Document the new request body limit in README, deployment docs, progress notes, environment example, and AGENTS context. - Rebuild and verify Docker web/api with a large report save through the Nginx /api proxy.
36 lines
1001 B
Nginx Configuration File
36 lines
1001 B
Nginx Configuration File
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
client_max_body_size 100m;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
gzip on;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
location /api/ {
|
|
proxy_pass http://api:3100/api/;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $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;
|
|
}
|
|
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
}
|