我在nginx中build立了一个非常基本的代理规则。 但是,请求被代理的资源会执行引用程序检查。 它必须是服务运行在同一个域。 因此我需要改变引用者。 我尝试了一个proxy_set_header,但似乎没有工作。
我错过了什么或有没有其他的方式来做到这一点?
location /api/v1/ { proxy_pass http://192.168.10.10:8080; proxy_set_header Referer "http://192.168.10.10"; }
你说,代理服务器要求一个域名作为引用者。 尝试该域名而不是IP地址。
proxy_set_header Referer "http://proxied-domain-here.com";