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

Add clearer exception on misconfigured REMOTE_ADDR #220

Merged
merged 1 commit into from
Jan 25, 2021
Merged

Add clearer exception on misconfigured REMOTE_ADDR #220

merged 1 commit into from
Jan 25, 2021

Conversation

jsocol
Copy link
Owner

@jsocol jsocol commented Jan 25, 2021

Fixes #209.

Certain configurations of Django when running behind a reverse proxy
that communicates with the app server over Unix sockets can lead to
REMOTE_ADDR being empty or missing. In these situations, IP-based
ratelimiting can behave unexpectedly or fail in unclear ways. This makes
the exception for an empty REMOTE_ADDR more clear and points to the
documentation.
@jsocol jsocol merged commit 4980d17 into main Jan 25, 2021
@jsocol jsocol deleted the empty-ip branch January 25, 2021 02:23
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.

ValueError: '/32' does not appear to be an IPv4 or IPv6 network
1 participant