changed BadGateway check, allow if dest host includes request host