2026-10-15 11:30:55 +08:00
|
|
|
# Temporary acceptance ports; change to 80 / 8182 only during the reviewed cutover.
|
|
|
|
|
server {
|
|
|
|
|
listen 28181;
|
|
|
|
|
server_name 192.168.28.10;
|
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
|
index index.html;
|
|
|
|
|
client_max_body_size 60m;
|
2026-10-18 08:49:30 +08:00
|
|
|
# CMVR mobile OTA is independent of backend releases.
|
|
|
|
|
location = /updates/prod {
|
|
|
|
|
proxy_pass http://127.0.0.1:8190;
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
proxy_set_header Connection "";
|
|
|
|
|
proxy_connect_timeout 3s;
|
|
|
|
|
proxy_read_timeout 15s;
|
|
|
|
|
proxy_buffering off;
|
|
|
|
|
}
|
|
|
|
|
location ^~ /updates/ { return 404; }
|
|
|
|
|
location ~ "^/assets/[a-f0-9]{64}$" {
|
|
|
|
|
proxy_pass http://127.0.0.1:8190;
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
proxy_set_header Connection "";
|
|
|
|
|
proxy_connect_timeout 3s;
|
|
|
|
|
proxy_read_timeout 30s;
|
|
|
|
|
}
|
2026-10-15 11:30:55 +08:00
|
|
|
location / {
|
|
|
|
|
try_files $uri $uri/ /index.html;
|
|
|
|
|
add_header Cache-Control "no-store" always;
|
|
|
|
|
}
|
2026-10-16 15:30:10 +08:00
|
|
|
# Nginx 1.25's default MIME map omits .mjs; PDF module workers require JavaScript MIME.
|
|
|
|
|
location ^~ /static/mjs/ {
|
|
|
|
|
types { application/javascript mjs; }
|
|
|
|
|
try_files $uri =404;
|
|
|
|
|
add_header Cache-Control "public, max-age=31536000, immutable" always;
|
|
|
|
|
}
|
2026-10-15 11:30:55 +08:00
|
|
|
location ^~ /static/ {
|
|
|
|
|
try_files $uri =404;
|
|
|
|
|
add_header Cache-Control "public, max-age=31536000, immutable" always;
|
|
|
|
|
}
|
2026-10-16 15:30:10 +08:00
|
|
|
# Attachment recognition may wait up to 180 seconds for the model.
|
|
|
|
|
# Keep this allowance local to the assistant; normal APIs retain 120 seconds.
|
|
|
|
|
location = /prod-api/warehouse/assistant/message {
|
|
|
|
|
proxy_pass http://127.0.0.1:28183/warehouse/assistant/message;
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
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_set_header Connection "";
|
|
|
|
|
proxy_connect_timeout 10s;
|
|
|
|
|
proxy_read_timeout 210s;
|
|
|
|
|
proxy_buffering off;
|
|
|
|
|
}
|
2026-10-15 11:30:55 +08:00
|
|
|
location /prod-api/ {
|
|
|
|
|
proxy_pass http://127.0.0.1:28183/;
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
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_set_header Connection "";
|
|
|
|
|
proxy_connect_timeout 10s;
|
|
|
|
|
proxy_read_timeout 120s;
|
|
|
|
|
proxy_buffering off;
|
|
|
|
|
}
|
|
|
|
|
location ~ /\. {
|
|
|
|
|
deny all;
|
|
|
|
|
}
|
|
|
|
|
}
|