Skip to content

Instantly share code, notes, and snippets.

@ollyg
Last active December 19, 2023 19:09
Show Gist options
  • Save ollyg/5782078 to your computer and use it in GitHub Desktop.
Save ollyg/5782078 to your computer and use it in GitHub Desktop.
Setting X-REMOTE_USER in Apache proxied request
RequestHeader unset X-REMOTE_USER
RequestHeader set X-REMOTE_USER "%{REMOTE_USER}e" env=REMOTE_USER
# see http://httpd.apache.org/docs/current/mod/mod_headers.html#header
@ollyg
Copy link
Author

ollyg commented Dec 19, 2023

Specifically when Apache is running a reverse proxy together with local authentication within Apache (for example mod_webauth), there is a legitimate use case for the config above to pass the username set by authentication through to the proxied app. I can imagine without this context it would not seem a very useful configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment