Repository navigation
fix reverse proxy trust and client IP logging - #608
Merged
Merged
Conversation
crazy-max
force-pushed
the
fix-reverse-proxy-peer
branch
from
November 15, 2026 08:55
1045cd8 to
b7aa466
Compare
crazy-max
marked this pull request as ready for review
November 15, 2026 08:58
murrant
reviewed
Nov 15, 2026
Preserve the original connection address and port when passing requests to PHP-FPM. Rewriting REMOTE_ADDR to the client address prevented LibreNMS from recognizing trusted proxies, causing HTTPS requests to generate HTTP URLs. Generate Nginx's proxy trust rules from LibreNMS's cached configuration so APP_TRUSTED_PROXIES controls both forwarded-header handling and client IP logging. Keep PHP-FPM environment clearing enabled. Retain REAL_IP_FROM as an explicit logging override, while treating the legacy 0.0.0.0/32 placeholder as automatic configuration. Validate generated IP and CIDR entries so malformed settings cannot break Nginx startup. Remove the hard-coded Traefik network and subnet, and log the validated client address instead of the raw forwarded header.
crazy-max
force-pushed
the
fix-reverse-proxy-peer
branch
from
November 16, 2026 09:37
b7aa466 to
0a1730d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preserve the original connection address and port when passing requests to PHP-FPM. Rewriting REMOTE_ADDR to the client address prevented LibreNMS from recognizing trusted proxies, causing HTTPS requests to generate HTTP URLs.
Generate Nginx's proxy trust rules from LibreNMS's cached configuration so APP_TRUSTED_PROXIES controls both forwarded-header handling and client IP logging. Keep PHP-FPM environment clearing enabled.
Retain REAL_IP_FROM as an explicit logging override, while treating the legacy 0.0.0.0/32 placeholder as automatic configuration. Validate generated IP and CIDR entries so malformed settings cannot break Nginx startup.
Remove the hard-coded Traefik network and subnet, and log the validated client address instead of the raw forwarded header.