nginx 转发请求头信息

nginx 转发请求头信息 让后台接口程序能获取到必要的请求头信息

# 转发host

proxy_set_header Host $host;

# 转发用户ip
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

# 转发用访问时 使用的scheme 协议
proxy_set_header X-Forwarded-Scheme $scheme;

原文地址:https://www.cnblogs.com/rchao/p/15571511.html