Package Exports
- requrl
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (requrl) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
requrl
Grab full URL from request.
Features
- Universal (browser and node.js) support
- Detect HTTPS requests using is-https
- Support
x-forwarded-proto
andx-forwarded-host
- Always encode URI
- Super Small
Usage
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
License
MIT