@capacitor/ios
Advanced tools
Comparing version 5.7.7 to 5.7.8
@@ -147,8 +147,7 @@ | ||
const CAPACITOR_HTTP_INTERCEPTOR = '/_capacitor_http_interceptor_'; | ||
const CAPACITOR_HTTPS_INTERCEPTOR = '/_capacitor_https_interceptor_'; | ||
const CAPACITOR_HTTP_INTERCEPTOR_URL_PARAM = 'u'; | ||
// TODO: export as Cap function | ||
const isRelativeOrProxyUrl = (url) => !url || | ||
!(url.startsWith('http:') || url.startsWith('https:')) || | ||
url.indexOf(CAPACITOR_HTTP_INTERCEPTOR) > -1 || | ||
url.indexOf(CAPACITOR_HTTPS_INTERCEPTOR) > -1; | ||
url.indexOf(CAPACITOR_HTTP_INTERCEPTOR) > -1; | ||
// TODO: export as Cap function | ||
@@ -159,8 +158,5 @@ const createProxyUrl = (url, win) => { | ||
return url; | ||
const proxyUrl = new URL(url); | ||
const bridgeUrl = new URL((_b = (_a = win.Capacitor) === null || _a === void 0 ? void 0 : _a.getServerUrl()) !== null && _b !== void 0 ? _b : ''); | ||
const isHttps = proxyUrl.protocol === 'https:'; | ||
bridgeUrl.search = proxyUrl.search; | ||
bridgeUrl.hash = proxyUrl.hash; | ||
bridgeUrl.pathname = `${isHttps ? CAPACITOR_HTTPS_INTERCEPTOR : CAPACITOR_HTTP_INTERCEPTOR}/${encodeURIComponent(proxyUrl.host)}${proxyUrl.pathname}`; | ||
bridgeUrl.pathname = CAPACITOR_HTTP_INTERCEPTOR; | ||
bridgeUrl.searchParams.append(CAPACITOR_HTTP_INTERCEPTOR_URL_PARAM, url); | ||
return bridgeUrl.toString(); | ||
@@ -167,0 +163,0 @@ }; |
{ | ||
"name": "@capacitor/ios", | ||
"version": "5.7.7", | ||
"version": "5.7.8", | ||
"description": "Capacitor: Cross-platform apps with JavaScript and the web", | ||
@@ -5,0 +5,0 @@ "homepage": "https://capacitorjs.com", |
Sorry, the diff of this file is not supported yet
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
348254
1035