Added method to check for HTTPS