Socket
Socket
Sign inDemoInstall

@podium/utils

Package Overview
Dependencies
Maintainers
5
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@podium/utils - npm Package Compare versions

Comparing version 4.2.1 to 4.2.2

16

lib/http-incoming.js

@@ -18,13 +18,6 @@ 'use strict';

const protocolFromRequest = (request = {}) => {
if (request.headers) {
const urlFromRequest = (request) => {
try {
const url = originalUrl(request);
return url.protocol ? url.protocol : 'http:';
}
return 'http:';
};
const urlFromRequest = (request, protocol) => {
try {
return new URL(request.url, `${protocol}//${request.headers.host}`);
return new URL(url.pathname, `${url.protocol}//${request.headers.host}`);
} catch (err) {

@@ -37,4 +30,3 @@ return {};

constructor(request = {}, response = {}, params = {}) {
const protocol = protocolFromRequest(request);
const url = urlFromRequest(request, protocol);
const url = urlFromRequest(request);

@@ -41,0 +33,0 @@ // Private properties

{
"name": "@podium/utils",
"version": "4.2.1",
"version": "4.2.2",
"description": "Common generic utility methods shared by @podium modules.",

@@ -5,0 +5,0 @@ "license": "MIT",

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