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