Skip to content
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

fix(config): reverse proxy ip ranges parse warning when unset #706

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

SIMULATAN
Copy link
Contributor

When the TrustReverseProxyIps configuration option is unset, it is "" by default. Thus, this empty string is still parsed at startup, leading to an annoying warning:

{"time":"2024-11-11T08:49:24.431844605Z","level":"WARN","msg":"failed to parse reverse proxy ip ranges"}

My fix is super simple, I decided to move it into the loop to also skip empty IPs within commas, for example when joining multiple IPs (like 10.x.x.x,,192.x.x.x).

@muety muety self-requested a review November 11, 2024 10:05
@muety muety merged commit 5bd1ffd into muety:master Nov 11, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants