do not resolve hostnames when matching unsafe registries

Signed-off-by: Kamil Domański <kamil@domanski.co> (github: kdomanski)