Skip to content

Commit

Permalink
Merge pull request #1184 from unsanded/patch-1
Browse files Browse the repository at this point in the history
Anonymous wiki through nginx (or other proxy)
  • Loading branch information
benjaoming committed May 7, 2022
2 parents 2fc998e + bea18ff commit a6b7cff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ Changed

* Python-Markdown updated to 3.3 :url-issue:`1180` (Benjamin Balder Bach)

Fixed
~~~~~

- Support for revision history w/ IP Address from ``HTTP_X_REAL_IP`` :url-issue:`1184` (David van Rijn)


0.8.1
-----
Expand Down
4 changes: 3 additions & 1 deletion src/wiki/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ def check_spam(self): # noqa
if request.user.is_authenticated:
user = request.user
else:
ip_address = request.META.get("REMOTE_ADDR", None)
ip_address = request.META.get("HTTP_X_REAL_IP", None) or request.META.get(
"REMOTE_ADDR", None
)

if not (user or ip_address):
raise forms.ValidationError(
Expand Down

0 comments on commit a6b7cff

Please sign in to comment.