def get_host(request):
    host = request.META.get('HTTP_X_FORWARDED_HOST', '')
    if not host:
        host = request.META.get('HTTP_HOST', '')
    return host
Gets the HTTP host from the environment or request headers.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-0.96/django/http/__init__.py/get_host