Simplify checks and unify possible values
Add https-only support.