Use in programming (Python / Django) a method HttpRequest.get_host () (# https://docs.djangoproject.com/en/dev/ref/request-response/ django.http.HttpRequest.get_host) but this method fails when the host is behind multiple proxies. In my application redirect some subdomains for her, and through the method mentioned recognize the subdomain in question.
Normally operates. The former method get the URI. (like [url]classificados.fatimanews.com.br[/url], [url]classificados.bonitoinforma.com.br[/url]) but today I created a subdomain ([url]classificados.portalaguasclaras.com.br[/url]), pointed to the IP of the machine, as I always do, and it happens that this time the method returns the IP of the machine and not the URL for me to identify it.
I use nginx. What would it take? Could you help me?