forwarded-host
Determine the URL of the originating request using x-forwarded-host, x-forwarded-port and x-forwarded-proto. Ideal if you are running a service behind a proxy and want to serve up absolute URLs in your response payload.
Installation
The module is released in the npm registry:
npm install --save forwarded-host
Getting started
Include the module in to your application:
'use strict'; var forwarded = ; ;
Run the service behind a proxy and as long as X-Forwarded-Host is sent in the header, the URL should be correct.