我必须使用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;
}
}