Fixed #19866 -- disallowed hosts return 400

Thanks to tiwoc for the suggestion