Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

follow-redirects

Package Overview
Dependencies
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

follow-redirects - npm Package Compare versions

Comparing version 1.14.7 to 1.14.8

10

index.js

@@ -395,4 +395,5 @@ var url = require("url");

// Drop the confidential headers when redirecting to another domain
if (!(redirectUrlParts.host === currentHost || isSubdomainOf(redirectUrlParts.host, currentHost))) {
// Drop confidential headers when redirecting to another scheme:domain
if (redirectUrlParts.protocol !== currentUrlParts.protocol ||
!isSameOrSubdomain(redirectUrlParts.host, currentHost)) {
removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);

@@ -563,3 +564,6 @@ }

function isSubdomainOf(subdomain, domain) {
function isSameOrSubdomain(subdomain, domain) {
if (subdomain === domain) {
return true;
}
const dot = subdomain.length - domain.length - 1;

@@ -566,0 +570,0 @@ return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);

{
"name": "follow-redirects",
"version": "1.14.7",
"version": "1.14.8",
"description": "HTTP and HTTPS modules that follow redirects.",

@@ -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