New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

get-request-origin

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-request-origin - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

dist/index.js

@@ -36,3 +36,3 @@ "use strict";

} = (0, _url.parse)(url);
const isSecure = req.secure || req.connection?.encrypted;
const isSecure = req.secure || (req.connection || {}).encrypted;
const fallbackProtocol = isSecure ? 'https:' : 'http:';

@@ -39,0 +39,0 @@ const protocol = urlProtocol || fallbackProtocol;

{
"name": "get-request-origin",
"version": "1.0.0",
"version": "1.0.1",
"description": "Get the URL origin from a Node request object.",

@@ -5,0 +5,0 @@ "author": "Alex Mendes",

@@ -22,3 +22,3 @@ import { parse as parseUrl } from 'url';

const isSecure = req.secure || req.connection?.encrypted;
const isSecure = req.secure || (req.connection || {}).encrypted;
const fallbackProtocol = isSecure ? 'https:' : 'http:';

@@ -25,0 +25,0 @@ const protocol = urlProtocol || fallbackProtocol;

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