proxy "apache like feature" RequestHeader unset authorization

Arjan Filius iafilius at
Thu Dec 2 11:27:00 MSK 2010


trying to setup Basic Authantication on a ningx reverse ssl  to http 
proxy, where the backend doesn't accept authentication.

now, nginx send the Authentication header to the upstream, and fails.

is there something like the apache feature "RequestHeader unset 
authorization" ??

proxy_hide_header  Authorization ;
but it still sends that Authorization header to backend.

Any idea how to do that?

location /someplace {
           auth_basic            "Restricted";
           auth_basic_user_file  /etc/apache2/Mypasswd ;

           proxy_set_header X-Real-IP $remote_addr;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
           proxy_set_header Host $http_host;
           proxy_set_header X-FORWARDED_PROTO https;
           proxy_redirect off;
 	  proxy_hide_header  Authorization ;
 	  proxy_pass http://someplace;


Arjan Filius
mailto:iafilius at

More information about the nginx mailing list