Fix to set HTTPS environment variable when requests come in over secure channel.