Socket
Socket
Sign inDemoInstall

express-public-url

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    express-public-url

Makes it easy to access correct URL when running behind a proxy or load balancer


Version published
Weekly downloads
225
decreased by-29.69%
Maintainers
1
Install size
5.06 kB
Created
Weekly downloads
 

Readme

Source

express-public-url

This little module adds req.urlBase and req.publicUrl to your express routes to make it easy to get the incoming request URL regardless of where you app us running - behind a proxy, load-balancer etc.

Installation

npm install --save express-public-url

Usage

var express = require('express');
var app = express();

// require module
var expressPublicUrl = require('express-public-url');

// add middleware to get the public Url from either the http proxy headers or current request host
app.use(expressPublicUrl());

Star the repo

If you find this useful please star the repo, it helps us prioritize which open source bugs to fix :raised_hands:

History

For change-log, check releases.

License

Licensed under MIT License © John Doherty

Keywords

FAQs

Last updated on 22 Aug 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc