From af43f4cf5287a0e3c67f1c8626c7fec0068e8d3b Mon Sep 17 00:00:00 2001 From: rad168 <86744795+rad168@users.noreply.github.com> Date: Fri, 31 Jan 2025 11:52:10 +0800 Subject: [PATCH] Update nginx.conf --- mytv/nginx.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mytv/nginx.conf b/mytv/nginx.conf index a3499a7..151e832 100644 --- a/mytv/nginx.conf +++ b/mytv/nginx.conf @@ -31,6 +31,9 @@ http { ## # 日志设置 ## + set_real_ip_from 0.0.0.0/0; # 允许所有代理传递真实 IP + real_ip_header X-Forwarded-For; + real_ip_recursive on; log_format custom '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"';