Critical Fix to support http as well. Handle https from webserver