I am using nodejs and expressjs. I wonder if there is something like
request.headers.protocol in the clientRequest object. I would like to build the baseUrl for the web links. So if the request was done via https I would like to keep https in all links.
var baseUrl = request.headers.protocol + request.headers.host;