Changed valid host checking so that it's regex instead of exact match.