Commit 7697712c authored by fred's avatar fred

fix erroneous self refence in internal_ip context processor

parent 23d35df3
from django.conf import settings from django.conf import settings
def internal_ip(request): def internal_ip(request):
internal_ip = self.request.META.get('HTTP_X_FORWARDED_FOR') or \ internal_ip = request.META.get('HTTP_X_FORWARDED_FOR') or \
self.request.META.get('HTTP_X_REAL_IP') or \ request.META.get('HTTP_X_REAL_IP') or \
self.request.META.get('REMOTE_ADDR') request.META.get('REMOTE_ADDR')
return internal_ip in settings.INTERNAL_IPS return internal_ip in settings.INTERNAL_IPS
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment