Changing and adding HTTP headers as part of the reverse proxy

Jan 28, 2010 at 7:16 AM

Can URL Rewriter modify HTTP headers as part of the request to the proxied server? In apache I have a config like:

 

RequestHeader unset X_REMOTE_USER
RewriteCond %{LA-U:REMOTE_USER} (.+)
RewriteRule ^/(.*)$ http://localhost:8080/VirtualHostBase/http/%{SERVER_NAME}:80/Plone/VirtualHostRoot/$1 [L,P,E=RU:%1]
RequestHeader set X_REMOTE_USER %{RU}e

RequestHeader unset X_REMOTE_USER

RewriteCond %{LA-U:REMOTE_USER} (.+)

RewriteRule ^/(.*)$ http://localhost:8080/VirtualHostBase/http/%{SERVER_NAME}:80/Plone/VirtualHostRoot/$1 [L,P,E=RU:%1]

RequestHeader set X_REMOTE_USER %{RU}e

Which means we can use the web server to handle authentication (like NTLM or Kerberos) and just pass the resulting username on to the backend application server as a header. Is there a way to make this work with IIS?

 

Coordinator
Jan 28, 2010 at 8:01 PM

I need to look in to the RequestHeader command, because currently it is not supported. 

Coordinator
Jan 28, 2010 at 8:01 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.