Adding automatic redirection to https in production env.
Minified production-ready version