-
Notifications
You must be signed in to change notification settings - Fork 85
Add configurable REMOTEIP_HEADER environment variable for Apache #377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add configurable REMOTEIP_HEADER environment variable for Apache #377
Conversation
frankenbubble
commented
Sep 18, 2025
- Add REMOTEIP_HEADER environment variable with X-Forwarded-For default
- Replace hardcoded RemoteIPHeader with ${REMOTEIP_HEADER} variable
- Update both regular and Alpine Dockerfiles
- Add documentation to README.md
- Maintains backward compatibility while allowing custom headers
- Enables CloudFront setups to use alternative header sources, such as CloudFront-Viewer-Address , vastly simplifying maintaining trusted ip lists
fzipi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
Won't we need to propagate this to nginx configuration templates also?
|
Hi, I believe its set here , https://github.com/coreruleset/modsecurity-crs-docker/blob/main/nginx/templates/includes/proxy_backend.conf.template#L20 , my thought was to add the equivalent feature into apache |
|
Hi @frankenbubble. Reading the docs:
So I think this is for a different setting. |
|
Hi, I mean Line 20, |
fzipi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for apache then.
|
Last ask @frankenbubble: can you sign your commits and ammend this PR? |
|
ping @frankenbubble |
cb251ec to
79f53f4
Compare
- Add REMOTEIP_HEADER environment variable with X-Forwarded-For default
- Replace hardcoded RemoteIPHeader with ${REMOTEIP_HEADER} variable
- Update both regular and Alpine Dockerfiles
- Add documentation to README.md
- Maintains backward compatibility while allowing custom headers
- Enables CloudFront/proxy setups to use alternative header sources
79f53f4 to
a3747b3
Compare