|
|
@@ -8,10 +8,37 @@ server {
|
|
|
gzip on;
|
|
|
gzip_types text/plain text/css application/json application/javascript application/xml image/svg+xml;
|
|
|
|
|
|
+ location = /app/download {
|
|
|
+ access_log off;
|
|
|
+ add_header Cache-Control "no-store" always;
|
|
|
+ add_header X-Content-Type-Options "nosniff" always;
|
|
|
+ add_header Referrer-Policy "no-referrer" always;
|
|
|
+ try_files /index.html =404;
|
|
|
+ }
|
|
|
+
|
|
|
location / {
|
|
|
try_files $uri $uri/ /index.html;
|
|
|
}
|
|
|
|
|
|
+ # 一次性 APP 下载票据不得进入访问日志;APK 响应直接流式转发。
|
|
|
+ location ^~ /prod-api/api/sysAppRelease/ {
|
|
|
+ access_log off;
|
|
|
+ add_header Cache-Control "no-store" always;
|
|
|
+ rewrite ^/prod-api/(.*)$ /$1 break;
|
|
|
+ proxy_pass http://api:5005;
|
|
|
+ proxy_http_version 1.1;
|
|
|
+ proxy_buffering off;
|
|
|
+ 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 X-Forwarded-Prefix /prod-api;
|
|
|
+ proxy_connect_timeout 60s;
|
|
|
+ proxy_send_timeout 300s;
|
|
|
+ proxy_read_timeout 300s;
|
|
|
+ client_max_body_size 320m;
|
|
|
+ }
|
|
|
+
|
|
|
# 与 Web/.env.production 中 VITE_API_URL=/prod-api 一致
|
|
|
location /prod-api/ {
|
|
|
proxy_pass http://api:5005/;
|
|
|
@@ -41,10 +68,38 @@ server {
|
|
|
gzip on;
|
|
|
gzip_types text/plain text/css application/json application/javascript application/xml image/svg+xml;
|
|
|
|
|
|
+ location = /app/download {
|
|
|
+ access_log off;
|
|
|
+ add_header Cache-Control "no-store" always;
|
|
|
+ add_header Strict-Transport-Security "max-age=31536000" always;
|
|
|
+ add_header X-Content-Type-Options "nosniff" always;
|
|
|
+ add_header Referrer-Policy "no-referrer" always;
|
|
|
+ try_files /index.html =404;
|
|
|
+ }
|
|
|
+
|
|
|
location / {
|
|
|
try_files $uri $uri/ /index.html;
|
|
|
}
|
|
|
|
|
|
+ # 一次性 APP 下载票据不得进入访问日志;APK 响应直接流式转发。
|
|
|
+ location ^~ /prod-api/api/sysAppRelease/ {
|
|
|
+ access_log off;
|
|
|
+ add_header Cache-Control "no-store" always;
|
|
|
+ rewrite ^/prod-api/(.*)$ /$1 break;
|
|
|
+ proxy_pass http://api:5005;
|
|
|
+ proxy_http_version 1.1;
|
|
|
+ proxy_buffering off;
|
|
|
+ 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 X-Forwarded-Prefix /prod-api;
|
|
|
+ proxy_connect_timeout 60s;
|
|
|
+ proxy_send_timeout 300s;
|
|
|
+ proxy_read_timeout 300s;
|
|
|
+ client_max_body_size 320m;
|
|
|
+ }
|
|
|
+
|
|
|
location /prod-api/ {
|
|
|
proxy_pass http://api:5005/;
|
|
|
proxy_http_version 1.1;
|