Commit 098b1dbe authored by Luna's avatar Luna 📟

Allow raw IP as a fallback from CF header

parent 2a56e6e4
Pipeline #142170073 failed with stage
in 7 minutes and 42 seconds
......@@ -36,8 +36,7 @@ def get_ip_addr(request) -> str:
Handles the cloudflare headers responsible to set
the client's IP.
assert CF_HEADER in request.headers
if and CF_HEADER in request.headers:
return request.headers[CF_HEADER]
return request.ip
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment