1、Nginx指令add_header和proxy_set_header的区别
proxy_set_header是Nginx设置请求头信息给上游服务器,add_header是Nginx设置响应头信息给浏览器。
参考https://blog.csdn.net/qq_30038111/article/details/95211271
2、获取请求头信息
比如我们自定义header为X-Real-IP,通过第二个nginx获取该header时需要这样:
$http_x_real_ip; (一律采用小写,而且前面多了个http_,且横杠X-Real-IP变成了下划线x_real_ip)
参考https://www.cnblogs.com/linkenpark/p/7646402.html
https://blog.csdn.net/weixin_42133899/article/details/112884375
https://blog.csdn.net/pf1234321/article/details/83072550
