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

@forge/egress

Package Overview
Dependencies
Maintainers
2
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forge/egress - npm Package Compare versions

Comparing version 1.0.1-next.0 to 1.1.0-next.1

7

CHANGELOG.md
# @forge/egress
## 1.1.0-next.1
### Minor Changes
- 174deac: Add support for browser environments
## 1.0.1-next.0
### Patch Changes
- 3c0ac54: Move egress related services out of @forge/csp into new @forge/egress package

11

out/egress/egress-filtering-service.js

@@ -9,9 +9,7 @@ "use strict";

constructor(allowList) {
this.URLs = allowList
.filter((domainOrURL) => !domainOrURL.startsWith('*'))
.map((url) => this.safeURL(url));
this.URLs = allowList.filter((domainOrURL) => !domainOrURL.startsWith('*')).map((url) => this.safeURL(url));
this.wildcardDomains = allowList
.filter((domainOrURL) => domainOrURL !== '*')
.map((url) => this.safeURL(url))
.filter((url) => url.hostname.startsWith('*'));
.filter((url) => decodeURIComponent(url.hostname).startsWith('*'));
this.allowsEverything = allowList.includes('*');

@@ -21,3 +19,4 @@ }

const protocolRegex = /^(.*:\/\/)/;
return new url_1.URL(protocolRegex.test(url) ? url : `${defaultProtocol}${url}`);
const urlParser = url_1.URL !== null && url_1.URL !== void 0 ? url_1.URL : window.URL;
return new urlParser(protocolRegex.test(url) ? url : `${defaultProtocol}${url}`);
}

@@ -33,3 +32,3 @@ isValidUrl(url) {

.filter((allowed) => allowed.protocol === domain.protocol)
.map((url) => url.hostname);
.map((url) => decodeURIComponent(url.hostname));
return (micromatch_1.default([domain.hostname], hostnameMatchedProtocol, {

@@ -36,0 +35,0 @@ dot: true

{
"name": "@forge/egress",
"version": "1.0.1-next.0",
"version": "1.1.0-next.1",
"description": "Helpers and utils for egress implementation in Forge apps",

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

Sorry, the diff of this file is not supported yet

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