Add support for envs
Redirect to https