Skip to content
Back

CORS error using the Locale API from a browser: CORS Allow Origin Not Matching Origin

  • 0
  • Self Hosted
  • Web
Lexy
21 Nov, 2025, 13:39

When I call the GET /v1/locale API with JS in a browser the GET request fails with CORS Allow Origin Not Matching Origin.

Requests to GET /v1/databases/... work fine and return the correct access-control-allow-origin header (domain.com), but the /v1/locale returns the Appwrite url only (api.domain.com). The OPTION request for the locale also succeeds with the correct header.

I have added the domain as a platform in the console.

TL;DR
Developers are facing a CORS error when using the Locale API from a browser, specifically `CORS Allow Origin Not Matching Origin`. The issue seems to be with the `GET /v1/locale` API request not returning the correct `access-control-allow-origin` header. Developers have ensured that the domain is added as a platform in the console. Solution: Double-check if the project ID is included in the request header for `GET /v1/locale` API.
Devika
21 Nov, 2025, 13:44

Are you including your project ID in the request header?

Lexy
21 Nov, 2025, 13:49

Yes, it's sent in the X-Appwrite-Project header. The Databases API and Account API work but not the Locale API

Devika
21 Nov, 2025, 13:53

Can you share the code with me?

Devika
21 Nov, 2025, 13:53

Only the part where you're handling this

Devika
21 Nov, 2025, 13:57

And have you added your domain in the platform?

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