Fix using HTTP secure and insecure protocols in local env and in sandbox.