如何在Nginx代理服务器的上游请求中传递标头?

我必须使用nginx代理为传出请求设置自定义标头,因此基本上我是从conf文件(已添加片段)中尝试add_header和proxy_set_header指令开始的,但是在传出请求中,这些标头并未使用其中。请给我建议解决这个问题的方法。

   server {
        listen       8095;
        access_log  logs/host.access.log;
        location / {
            proxy_pass https://www.dummy-site.com/applications/1232;
            proxy_set_header Authorization "some_authorisation";
            proxy_set_header referer "referer";
            proxy_pass_request_headers on;
        }
   }
zhaoqiyun59240 回答:如何在Nginx代理服务器的上游请求中传递标头?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3145618.html

大家都在问