adding support for secure http/websocket connections