【发布时间】:2015-10-15 01:48:45
【问题描述】:
如何阻止 Apache 2.4 将 Basic Auth 标头转发到反向代理的 tomcat 站点。目标应用程序尝试使用标头将用户登录到破坏应用程序的应用程序。
我曾考虑过使用
RequestHeader unset Authorization
但这只是完全禁用基本身份验证
这是虚拟主机:
<VirtualHost *:80>
ServerName app.company.tld
ErrorLog "/var/log/company-proxy/app_prox_error_log"
CustomLog "/var/log/company-proxy/app_prox_access_log" common
SSLProxyEngine On
ProxyRequests Off
<Proxy *>
Order deny,allow
Deny from all
Allow from all
</Proxy>
<Location />
AuthType Basic
AuthName "Proxy Auth"
AuthUserFile /var/www/company-auth/APP/.htpasswd
Require user username
Satisfy any
Deny from all
Allow from 1.0.0.0/16
</Location>
ProxyPreserveHost On
ProxyPass / http://app.company.tld:1000/
ProxyPassReverse / http://app.company.tld:1000/
</VirtualHost>
【问题讨论】:
标签: linux apache http configuration proxy