Socket
Socket
Sign inDemoInstall

express-public-url

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-public-url - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

5

lib/express-public-url.js

@@ -12,5 +12,6 @@ 'use strict';

var hostHeaderValue = String(req.headers.host || '');
var protocol = (req.headers['x-forwarded-proto'] || '').split(',')[0] || req.protocol || 'http';
var host = (req.headers['x-forwarded-host'] || '').split(',')[0] || req.headers.host.replace(/:[0-9]+/, '');
var port = (req.headers['x-forwarded-port'] || '').split(',')[0] || req.app.settings.port || (req.headers.host.match(/:([0-9]+)/) || [])[1] || '';
var host = (req.headers['x-forwarded-host'] || '').split(',')[0] || hostHeaderValue.replace(/:[0-9]+/, '');
var port = (req.headers['x-forwarded-port'] || '').split(',')[0] || req.app.settings.port || (hostHeaderValue.match(/:([0-9]+)/) || [])[1] || '';
var resource = (req.url === '/') ? '' : req.url;

@@ -17,0 +18,0 @@

2

package.json
{
"name": "express-public-url",
"version": "1.0.2",
"version": "1.0.3",
"description": "Makes it easy to access correct URL when running behind a proxy or load balancer",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc