Skip to content

Commit

Permalink
Proxy: change default offset to take final IP
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-smt committed Sep 5, 2023
1 parent 8a7718b commit 4efa977
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion weblate/settings_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@
# Reverse proxy settings
IP_PROXY_HEADER = get_env_str("WEBLATE_IP_PROXY_HEADER")
IP_BEHIND_REVERSE_PROXY = bool(IP_PROXY_HEADER)
IP_PROXY_OFFSET = 0
IP_PROXY_OFFSET = -1

# Sending HTML in mails
EMAIL_SEND_HTML = True
Expand Down
2 changes: 1 addition & 1 deletion weblate/settings_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@
# Reverse proxy settings
IP_PROXY_HEADER = "HTTP_X_FORWARDED_FOR"
IP_BEHIND_REVERSE_PROXY = False
IP_PROXY_OFFSET = 0
IP_PROXY_OFFSET = -1

# Sending HTML in mails
EMAIL_SEND_HTML = True
Expand Down
2 changes: 1 addition & 1 deletion weblate/trans/models/_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class WeblateConf(AppConf):
# Rate limiting
IP_BEHIND_REVERSE_PROXY = False
IP_PROXY_HEADER = "HTTP_X_FORWARDED_FOR"
IP_PROXY_OFFSET = 0
IP_PROXY_OFFSET = -1

# Authentication
AUTH_TOKEN_VALID = 172800
Expand Down

0 comments on commit 4efa977

Please sign in to comment.