@forge/egress
Advanced tools
Comparing version 1.1.3-next.0 to 1.2.0-next.1
# @forge/egress | ||
## 1.2.0-next.1 | ||
### Minor Changes | ||
- 3bdedf0: Fix URL-constructor in Firefox browsers | ||
## 1.1.3-next.0 | ||
@@ -4,0 +10,0 @@ |
@@ -6,3 +6,3 @@ "use strict"; | ||
const minimatch_1 = tslib_1.__importDefault(require("minimatch")); | ||
const url_1 = require("url"); | ||
const url_parser_1 = require("./url-parser"); | ||
class EgressFilteringService { | ||
@@ -20,4 +20,4 @@ constructor(allowList) { | ||
const protocolRegex = /^(.*:\/\/)/; | ||
const urlParser = url_1.URL !== null && url_1.URL !== void 0 ? url_1.URL : window.URL; | ||
return new urlParser(protocolRegex.test(url) ? url : `${this.DEFAULT_PROTOCOL}${url}`); | ||
const urlWithProtocol = protocolRegex.test(url) ? url : `${this.DEFAULT_PROTOCOL}${url}`; | ||
return (0, url_parser_1.parseUrl)(urlWithProtocol); | ||
} | ||
@@ -24,0 +24,0 @@ isValidUrl(url) { |
@@ -5,3 +5,3 @@ "use strict"; | ||
const minimatch_1 = require("minimatch"); | ||
const url_1 = require("url"); | ||
const url_parser_1 = require("./url-parser"); | ||
const sortAndGroupEgressPermissionsByDomain = (egressAddresses) => { | ||
@@ -16,3 +16,3 @@ if ((egressAddresses === null || egressAddresses === void 0 ? void 0 : egressAddresses.length) === 0) { | ||
const itemWithProtocol = protocolRegex.test(item) ? item : `https://${item}`; | ||
const url = new url_1.URL(itemWithProtocol); | ||
const url = (0, url_parser_1.parseUrl)(itemWithProtocol); | ||
if (url.hostname.startsWith('*')) { | ||
@@ -19,0 +19,0 @@ domains.add(url.hostname.substring(2)); |
{ | ||
"name": "@forge/egress", | ||
"version": "1.1.3-next.0", | ||
"version": "1.2.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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7130
17
102