fix(nginx): admin 对齐 assets 配置;443 显式 /admin/assets/ 反代

Made-with: Cursor
This commit is contained in:
whm
2026-03-23 18:04:23 +08:00
parent 7980c1922a
commit ee9394f410
3 changed files with 28 additions and 2 deletions

View File

@@ -26,6 +26,18 @@ server {
add_header Cache-Control "no-store";
}
# ^~ location /strip /admin rewrite+break upstream web
location ^~ /admin/assets/ {
rewrite ^/admin/(.*)$ /$1 break;
set $upstream_admin admin;
proxy_pass http://$upstream_admin:80;
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;
}
location / {
set $upstream_web web;
proxy_pass http://$upstream_web:80;