Added HTTP and HTTPS detection in the front-end