front/nginx-docker.conf
zzh 30afc1728c 优化仓储与店铺列表页,并补齐 warehouse 代理与列宽自适应。
管理端可正常查看列表;分页移至工具栏右侧,列定义对齐 WMS,Handsontable 开启 stretch-columns。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-11 16:14:44 +08:00

171 lines
7.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Docker 容器专用:只监听 80,不配置 SSL(7962:80,由外层网关/宿主机 nginx 终结 HTTPS)
server {
listen 80;
server_name _;
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_types text/plain text/css text/xml text/javascript application/javascript application/json application/xml image/svg+xml;
root /usr/share/nginx/html;
rewrite ^/login/?$ / permanent;
rewrite ^/admin/?$ /index.html last;
location = /admin {
try_files /index.html =200;
}
location = /admin/ {
try_files /index.html =200;
}
location ~ ^/api/(upstreamInterface|upstreamInterfaceConfig|upstreamInterfaceConfigEdit|downstreamInterface(|/newPort)|appList(|/createApplication)|requestLog|callStatistics|apiDebugger|apiTest)(/|$) {
try_files /index.html =200;
}
location ^~ /xhs/startService { try_files /index.html =200; }
location ^~ /xhs/creation { try_files /index.html =200; }
location ^~ /xhs/publishHistory { try_files /index.html =200; }
location ^~ /xhs/skills { try_files /index.html =200; }
location ^~ /xhs/humanSettings { try_files /index.html =200; }
location ^~ /xhs/agentPair { try_files /index.html =200; }
location = /xhs/analysis { try_files /index.html =200; }
location = /xhs/analysis/ { try_files /index.html =200; }
location ^~ /wechat/register { try_files /index.html =200; }
location ^~ /wechat/bind { try_files /index.html =200; }
location ^~ /track/query { try_files /index.html =200; }
location ^~ /operation/inboundScan { try_files /index.html =200; }
location ^~ /operation/outboundScan { try_files /index.html =200; }
location ^~ /operation/printLabel { try_files /index.html =200; }
# 订单前端路由(^~ 须比下方 /order/ API 正则代理更优先)
location ^~ /order/priceCheck { try_files /index.html =200; }
location ^~ /order/placeOrder { try_files /index.html =200; }
location ^~ /order/myOrders { try_files /index.html =200; }
location ^~ /order/batchJobs { try_files /index.html =200; }
location ^~ /order/templateMapping { try_files /index.html =200; }
location ^~ /order/platformStore { try_files /index.html =200; }
location ^~ /order/platformStoreOrder { try_files /index.html =200; }
location = /warehouse/parcel { try_files /index.html =200; }
location = /warehouse/inventory { try_files /index.html =200; }
location = /warehouse/sku { try_files /index.html =200; }
location ^~ /warehouse/inboundNotice { try_files /index.html =200; }
location ^~ /channel/salesProducts { try_files /index.html =200; }
location ^~ /channel/serviceChannels { try_files /index.html =200; }
location ^~ /channel/priceArea { try_files /index.html =200; }
location ^~ /channel/blacklist { try_files /index.html =200; }
location ^~ /channel/remoteZones { try_files /index.html =200; }
location ^~ /channel/weightRules { try_files /index.html =200; }
location ^~ /channel/weightRounding { try_files /index.html =200; }
location ^~ /channel/autoTrigger { try_files /index.html =200; }
location ^~ /channel/issueTemplate { try_files /index.html =200; }
location ^~ /channel/labelDesign { try_files /index.html =200; }
# 系统管理前端路由(^~ 须比下方 /system/ API 正则代理更优先)
location = /system/dict { try_files /index.html =200; }
location = /system/warehouseAddress { try_files /index.html =200; }
location = /system/announcement { try_files /index.html =200; }
location ^~ /system/users { try_files /index.html =200; }
location ^~ /system/roles { try_files /index.html =200; }
location ^~ /system/menus { try_files /index.html =200; }
location ^~ /system/organizations { try_files /index.html =200; }
location ^~ /system/batchEmail { try_files /index.html =200; }
location ^~ /system/otherConfig { try_files /index.html =200; }
location ^~ /system/xhsAiAssistant { try_files /index.html =200; }
location ^~ /system/dataPerm/ { try_files /index.html =200; }
location ^~ /api/apiwechat/ {
rewrite ^/api/apiwechat/(.*)$ /admin/apiwechat/$1 break;
proxy_pass http://api.nanafa.com;
proxy_http_version 1.1;
proxy_set_header Host api.nanafa.com;
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 ~ ^/api/ {
rewrite ^/api/(.*)$ /itfx/$1 break;
proxy_pass http://api.nanafa.com;
proxy_http_version 1.1;
proxy_set_header Host api.nanafa.com;
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 ^~ /Track {
rewrite ^/Track(.*)$ /track/Track$1 break;
proxy_pass http://api.nanafa.com;
proxy_http_version 1.1;
proxy_set_header Host api.nanafa.com;
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 ~ ^/(rbac|order|monitor|customer|recharge|channel|system|warehouse)/ {
rewrite ^/(.*)$ /admin/$1 break;
proxy_pass http://api.nanafa.com;
proxy_http_version 1.1;
proxy_set_header Host api.nanafa.com;
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_read_timeout 120s;
}
location ^~ /wechat/ {
rewrite ^/(.*)$ /admin/$1 break;
proxy_pass http://api.nanafa.com;
proxy_http_version 1.1;
proxy_set_header Host api.nanafa.com;
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 ^~ /operation/ {
rewrite ^/(.*)$ /admin/$1 break;
proxy_pass http://api.nanafa.com;
proxy_http_version 1.1;
proxy_set_header Host api.nanafa.com;
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 ^~ /xhs/ {
rewrite ^/(.*)$ /admin/$1 break;
proxy_pass http://api.nanafa.com;
proxy_http_version 1.1;
proxy_set_header Host api.nanafa.com;
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_read_timeout 300s;
}
location = /index.html {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires "0";
}
location ~* \.(?:js|css)$ {
try_files $uri =404;
expires 1y;
add_header Cache-Control "public, immutable";
access_log off;
}
location / {
index index.html;
try_files $uri /index.html;
}
}