Merge soutade.fr:dynastie
This commit is contained in:
commit
6aedd6f910
6
views.py
6
views.py
|
@ -533,9 +533,9 @@ def add_comment(request, post_id, parent_id):
|
||||||
print 'Error on author or the_comment'
|
print 'Error on author or the_comment'
|
||||||
return HttpResponseRedirect(ref)
|
return HttpResponseRedirect(ref)
|
||||||
|
|
||||||
# Behind a proxy
|
# Behind nginx proxy
|
||||||
if 'X-Real-IP' in request.META:
|
if 'HTTP_X_FORWARDED_FOR' in request.META:
|
||||||
ip = request.META['X-Real-IP']
|
ip = request.META['HTTP_X_FORWARDED_FOR']
|
||||||
else:
|
else:
|
||||||
ip = request.META['REMOTE_ADDR']
|
ip = request.META['REMOTE_ADDR']
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user