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

typed-rest-client

Package Overview
Dependencies
Maintainers
10
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typed-rest-client - npm Package Compare versions

Comparing version 1.8.4 to 1.8.5

Constants.d.ts

2

package.json
{
"name": "typed-rest-client",
"version": "1.8.4",
"version": "1.8.5",
"description": "Node Rest and Http Clients for use with TypeScript",

@@ -5,0 +5,0 @@ "main": "./RestClient.js",

@@ -17,2 +17,3 @@ "use strict";

const zlib = require("zlib");
const Constants_1 = require("./Constants");
/**

@@ -109,13 +110,9 @@ * creates an url from a request url and optional base url (http://server:8080)

function buildProxyBypassRegexFromEnv(bypass) {
try {
// We need to keep this around for back-compat purposes
return new RegExp(bypass, 'i');
// check if expression starts with asterisk and replace it with .*
if (bypass && bypass.startsWith("*")) {
bypass = bypass.replace("*", ".*");
}
catch (err) {
if (err instanceof SyntaxError && (bypass || "").startsWith("*")) {
let wildcardEscaped = bypass.replace('*', '(.*)');
return new RegExp(wildcardEscaped, 'i');
}
throw err;
}
// replace all . symbols in string by \. because point is a special character
const safeRegex = (bypass || "").replace(Constants_1.searchRegExpToReplaceSpecialChars, '\\$1');
return new RegExp(safeRegex, 'i');
}

@@ -122,0 +119,0 @@ exports.buildProxyBypassRegexFromEnv = buildProxyBypassRegexFromEnv;

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