Cloudflare workers + Realm web sdk

Hi,

I’m facing some errors with cloudflare workers + realm web login via API key.

I followed the blog / tutorial on creating a rest API with cf workers and mongo db realm .

The worker works when I fetch the worker at worker.domain.workers.dev (cloudflare workers domain).

But when I deploy the worker to my own custom domain - e.g. https://api.domain.com

I face a status525 error logging into realm.

Request failed (GET https://stitch.mongodb.com/api/client/v2.0/app/app-id/location): (status 525)\nError: Request failed (GET https://stitch.mongodb.com/api/client/v2.0/app//location): (status 525)

Would anyone have a work around this ?

Did you update the App ID configuration in the wrangler.toml file? cloudflare-worker-rest-api-atlas/wrangler.toml at main · mongodb-developer/cloudflare-worker-rest-api-atlas · GitHub

It looks to me like the SDK is requesting the location of an app with the id “app-id”.