[nginx带有www-authenticate的nginx反向代理问题

问题描述 投票:0回答:1

我想使用nginx反向代理将传入的http请求路由到本地端口8081,但是在8081上运行的应用程序需要www-authenticate标头授权,邮递员给我状态401“身份验证失败”(图像1)。但是,当我使用Apache httpd进行反向代理时,我会成功获得结果。

无法通过www-authenticatePostman results nginx www-authentication

这里处理另一个使用基本身份验证的请求Postman results nginx basic type authentication

这是我的nginx.conf

               location /webfolder/ {
                    proxy_pass http://localhost:8081;
                    proxy_set_header HOST $host;
                    proxy_set_header X-Forwarded-Proto $scheme;
                    proxy_set_header X-Real-IP $remote_addr;

[因为我不熟悉nginx,nginx版本1.16,请在此问题上帮助我

nginx centos7 nginx-reverse-proxy openresty www-authenticate
1个回答
0
投票
要解决该问题,您需要在nginx.conf中添加underscores_in_headers on;问题已解决。
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.