Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: fix trailing slash when saving cors proxy url Signed-off-by: 01zulfi <[email protected]>

01zulfi72351960fabe
diff --git a/apps/web/src/dialogs/settings/privacy-settings.ts b/apps/web/src/dialogs/settings/privacy-settings.ts
index c4f6b40f2..2e484ff75 100644
--- a/apps/web/src/dialogs/settings/privacy-settings.ts
+++ b/apps/web/src/dialogs/settings/privacy-settings.ts
@@ -124,7 +124,7 @@ export const PrivacySettings: SettingsGroup[] = [
if (!result) return;
try {
const url = new URL(result);
- Config.set("corsProxy", url.href);
+ Config.set("corsProxy", url.href.replace(/\/$/, ""));
} catch (e) {
console.error(e);
showToast("error", strings.invalidCors());