Changed Host to X-Forwarded-Host to make solution more failure resistent.