37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
# Insert inside app.glowtps.cn's HTTP server block managed by 1Panel.
|
|
# That server should listen on 10080; HTTPS terminates at SafeLine on 443.
|
|
# Do not enable an HTTP-to-HTTPS redirect on this internal server.
|
|
# Assumption: SafeLine connects from loopback, with a correct X-Forwarded-For.
|
|
set_real_ip_from 127.0.0.1;
|
|
set_real_ip_from ::1;
|
|
real_ip_header X-Forwarded-For;
|
|
real_ip_recursive on;
|
|
|
|
location = /v1/feedback {
|
|
client_max_body_size 21m;
|
|
client_body_timeout 60s;
|
|
proxy_request_buffering off;
|
|
proxy_buffering off;
|
|
proxy_http_version 1.1;
|
|
proxy_pass http://127.0.0.1:18080;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
proxy_set_header Connection "";
|
|
proxy_connect_timeout 5s;
|
|
proxy_send_timeout 180s;
|
|
proxy_read_timeout 180s;
|
|
proxy_next_upstream off;
|
|
access_log off;
|
|
}
|
|
|
|
location = /healthz {
|
|
proxy_pass http://127.0.0.1:18080;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-Proto https;
|
|
access_log off;
|
|
}
|