Files
core/configs/nginx.conf
Innei 057a232915 fix: add real ip for cf
Signed-off-by: Innei <i@innei.in>
2024-02-13 17:50:13 +08:00

30 lines
646 B
Nginx Configuration File

#PROXY-START/
location /v2 {
proxy_pass http://127.0.0.1:2333/api/v2;
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 Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
proxy_ignore_headers Set-Cookie Cache-Control expires;
add_header Cache-Control no-cache;
expires 12h;
error_page 444 = @close_connection;
}
location @close_connection {
return 444;
}
#PROXY-END/