Ticket #9064: multiple_proxies.patch

File multiple_proxies.patch, 547 bytes (added by Artur, 6 years ago)
  • trunk/django/http/__init__.py

    old new  
    4747        # We try three options, in order of decreasing preference.
    4848        if 'HTTP_X_FORWARDED_HOST' in self.META:
    4949            host = self.META['HTTP_X_FORWARDED_HOST']
     50            comma = host.find(',')
     51            if comma > -1:
     52                host = host[0:comma]
    5053        elif 'HTTP_HOST' in self.META:
    5154            host = self.META['HTTP_HOST']
    5255        else:
Back to Top