Fix bug HTTPS detection (issue with IIS)