diff --git a/android/capacitor/src/main/assets/native-bridge.js b/android/capacitor/src/main/assets/native-bridge.js index 01a340469d..2a38f433d7 100644 --- a/android/capacitor/src/main/assets/native-bridge.js +++ b/android/capacitor/src/main/assets/native-bridge.js @@ -144,7 +144,7 @@ var nativeBridge = (function (exports) { if (isRelativeOrProxyUrl(url)) return url; const bridgeUrl = new URL((_b = (_a = win.Capacitor) === null || _a === void 0 ? void 0 : _a.getServerUrl()) !== null && _b !== void 0 ? _b : ''); - bridgeUrl.pathname = `${CAPACITOR_HTTP_INTERCEPTOR}`; + bridgeUrl.pathname = CAPACITOR_HTTP_INTERCEPTOR; // URLSearchParams `append()` method will automatically percent encode the url bridgeUrl.searchParams.append(CAPACITOR_HTTP_INTERCEPTOR_URL_PARAM, url); return bridgeUrl.toString(); diff --git a/core/native-bridge.ts b/core/native-bridge.ts index fc2163640a..f16c9a67d9 100644 --- a/core/native-bridge.ts +++ b/core/native-bridge.ts @@ -132,7 +132,7 @@ const isRelativeOrProxyUrl = (url: string | undefined): boolean => const createProxyUrl = (url: string, win: WindowCapacitor): string => { if (isRelativeOrProxyUrl(url)) return url; const bridgeUrl = new URL(win.Capacitor?.getServerUrl() ?? ''); - bridgeUrl.pathname = `${CAPACITOR_HTTP_INTERCEPTOR}`; + bridgeUrl.pathname = CAPACITOR_HTTP_INTERCEPTOR; // URLSearchParams `append()` method will automatically percent encode the url bridgeUrl.searchParams.append(CAPACITOR_HTTP_INTERCEPTOR_URL_PARAM, url); diff --git a/ios/Capacitor/Capacitor/assets/native-bridge.js b/ios/Capacitor/Capacitor/assets/native-bridge.js index 01a340469d..2a38f433d7 100644 --- a/ios/Capacitor/Capacitor/assets/native-bridge.js +++ b/ios/Capacitor/Capacitor/assets/native-bridge.js @@ -144,7 +144,7 @@ var nativeBridge = (function (exports) { if (isRelativeOrProxyUrl(url)) return url; const bridgeUrl = new URL((_b = (_a = win.Capacitor) === null || _a === void 0 ? void 0 : _a.getServerUrl()) !== null && _b !== void 0 ? _b : ''); - bridgeUrl.pathname = `${CAPACITOR_HTTP_INTERCEPTOR}`; + bridgeUrl.pathname = CAPACITOR_HTTP_INTERCEPTOR; // URLSearchParams `append()` method will automatically percent encode the url bridgeUrl.searchParams.append(CAPACITOR_HTTP_INTERCEPTOR_URL_PARAM, url); return bridgeUrl.toString();