Fixed a compatibility issue with the HTTPS detection and IIS