Grab full URL from request.
x-forwarded-proto
and x-forwarded-host
import getURL from 'requrl'
// OR
const getURL = require('requrl')
Function signuture is:
function getURL(req?: IncomingMessage, includePath?: boolean): string
Example:
const url = getURL(req)
// http://localhost:3000
// https://www.foo.com
MIT