From 6b796258d413f00e498ce7f80f73a9f6c061f29c Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Sat, 30 Mar 2024 23:40:33 +0100 Subject: Updated 5 files, added 2 files, deleted 495 files and renamed 7 files (automated) --- .../axios/lib/helpers/isURLSameOrigin.js | 67 ---------------------- 1 file changed, 67 deletions(-) delete mode 100644 includes/external/signal/node_modules/axios/lib/helpers/isURLSameOrigin.js (limited to 'includes/external/signal/node_modules/axios/lib/helpers/isURLSameOrigin.js') diff --git a/includes/external/signal/node_modules/axios/lib/helpers/isURLSameOrigin.js b/includes/external/signal/node_modules/axios/lib/helpers/isURLSameOrigin.js deleted file mode 100644 index 18db03b..0000000 --- a/includes/external/signal/node_modules/axios/lib/helpers/isURLSameOrigin.js +++ /dev/null @@ -1,67 +0,0 @@ -'use strict'; - -import utils from './../utils.js'; -import platform from '../platform/index.js'; - -export default platform.isStandardBrowserEnv ? - -// Standard browser envs have full support of the APIs needed to test -// whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - const msie = /(msie|trident)/i.test(navigator.userAgent); - const urlParsingNode = document.createElement('a'); - let originURL; - - /** - * Parse a URL to discover it's components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - let href = url; - - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } - - urlParsingNode.setAttribute('href', href); - - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } - - originURL = resolveURL(window.location.href); - - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : - - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })(); -- cgit