You've already forked favicon-api-async
init
This commit is contained in:
30
nginx.conf
Normal file
30
nginx.conf
Normal 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 *;
|
||||
}
|
||||
Reference in New Issue
Block a user