HUE-8836 [core] request.get_host() is broken when HTTP_X_FORWARDED_HOST contains multiple hosts

Review Request #13948 - Created May 14, 2019 and updated

Prakash Ranade
hue
hue
jgauthier, johan, ranade, romain, subrata, weixia, yingc

HUE-8836 [core] request.get_host() is broken when HTTP_X_FORWARDED_HOST contains multiple hosts

Tested on Browser --> Knox Proxy --> Hue Load Balancer --> Hue server. Working fine.

  • 0
  • 0
  • 0
  • 1
  • 1
Description From Last Updated
  1. 
      
  2. Nice, just instead of modifying Django code directly, could we use a middleware?

    Seems like an official solution? https://github.com/django/django/commit/6e201bcae2

    https://code.djangoproject.com/ticket/11877
    https://code.djangoproject.com/ticket/20303

    1. I think this middleware approach is controversial. As you see in the end, it changes the value of request.META[field]. My approach does not make any modification

      request.META[field] = parts[-1].strip()

  3. 
      
  1. Ship It!
  2. 
      
Loading...