def get_host(request):
    host = request.META.get('HTTP_X_FORWARDED_HOST', '')
    if not host:
        host = request.META.get('HTTP_HOST', '')
    return host
Testing the POST repositories/ API with all available info
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-0.96/django/http/__init__.py/get_host--crossover with--dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/webapi/tests/test_repository.py/ResourceListTests.test_post_full_info