docs(deploy): document PV/UV stats and real client IP via nginx realip
This commit is contained in:
1 parent
b215f8eb09
commit
ff5e05998a
11 files changed
+308
-6
No files matched your search
@@ -0,0 +1,12 @@
|
||||
# 放到 nginx.conf 的 http {} 内(或 http 级 include)。
|
||||
#
|
||||
# 仅当与 nginx 建立连接的对端属于下列 Cloudflare 网段时,才采信
|
||||
# CF-Connecting-IP;直连公网 EIP 的请求无法伪造该头。
|
||||
#
|
||||
# 网段清单由 update-cloudflare-ips.sh 生成到 /etc/nginx/cloudflare-ips.conf。
|
||||
# 若暂时未生成,可先注释掉 include(此时 CDN 访客会被记为 CF 节点 IP)。
|
||||
|
||||
real_ip_header CF-Connecting-IP;
|
||||
real_ip_recursive on;
|
||||
|
||||
include /etc/nginx/cloudflare-ips.conf;
|
||||
Reference in new issue
Block a user