I'm afraid that pretty much all you can do.
Unless you using https you can assume the protocol as http.
As Raoul said you are not able to get anything after # server-side, that's for the browser
var requestedUrl = 'http://' + req.headers.host + ':3000' + req.url