This commit is contained in:
jinql
2025-09-10 00:06:54 +08:00
commit f0b8929035
31 changed files with 2669 additions and 0 deletions

30
nginx.conf Normal file
View File

@@ -0,0 +1,30 @@
# 支持伪静态
rewrite ^/icon/(.*)\.png$ /icon/?url=$1;
# 反向代理配置
location /icon/
{
proxy_pass http://127.0.0.1:8001;
proxy_http_version 1.1;
## Proxy headers
proxy_set_header Upgrade $http_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 REMOTE-HOST $remote_addr;
proxy_set_header remote_addr $remote_addr;
proxy_set_header X-Proto $scheme;
## Proxy timeouts
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
# 后端返回错误时跳转到指定url
proxy_intercept_errors on;
error_page 400 404 408 500 502 503 504 /favicon.png;
add_header X-Cache $upstream_cache_status;
add_header Access-Control-Allow-Origin *;
}