Skip to content
Back

CORS errors in Obsidian custom plugin

  • 0
  • Self Hosted
  • Web
Gert Jan
13 Apr, 2026, 14:35

Hi, anyone here familiar with obsidian community plugins?

In short: it's a local first note app which supports writing your own add-ons / plugin But I keep getting CORS error when i use the sdk, both node-appwrite as client appwrite sdk.

All the references online can solve cors issue by adding a platform I've added every possible platform option setting i could think off, but i think the problem is that obsidian is an electron app. i tried to add origins localhost, *, my ip, obsidian.md, but none work

if i simply do this, but it applies to any function:

TypeScript
const user = await account.create({
                userId: ID.unique(),
                email: "email@example.com",
                password: "12345678",
            });

then obsidian first does a pre-flight check from origin 'app://obsidian.md' which gets accepted and then another request from origin 'app://localhost' which gets blocked

if i use obsidian's requestUrl (they expose this to prevent cors issues like this), then all my requests succeed, so i know it's not a database permission thing. However, especially now that im trying to implement storage which i find a bit more difficult, i would really like to fix this so i can use the sdk

Sorry if this is duplicate, i found https://appwrite.io/threads/1117832789891481750 which talks about electron app but that doesnt provide a solution for me

ps: I've been using Appwrite for a few months now. I know that does really not mean much at all, but i got it working before in other projects

TL;DR
Developers experiencing CORS errors in Obsidian custom plugins due to Electron app environment. Tried various platform settings to resolve, but no success. Simple requests work, but issues arise with more complex functions. Utilizing Obsidian's requestUrl can bypass CORS errors. Looking for a solution to use the SDK properly.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more