CORS error using the Locale API from a browser: CORS Allow Origin Not Matching Origin
- 0
- Self Hosted
- Web
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.
Are you including your project ID in the request header?
Yes, it's sent in the X-Appwrite-Project header. The Databases API and Account API work but not the Locale API
Can you share the code with me?
Only the part where you're handling this
And have you added your domain in the platform?
Recommended threads
- 408 Timeout / Curl Error 7 in Executor w...
Hey everyone, I am losing my mind over a routing loop/timeout issue on a fresh self-hosted setup. I have a single Linux VPS (IP: 45.141.37.105) and one domain (...
- functions returning error 401 in local
I updated to 1.9.0, and the functions that used to work fine in 1.8.1 are now giving me a 401 error. I can't seem to find a solution. If anyone is running versi...
- Docker Compose MongoDB Setup
everythings work fine but the mongodb fails on startup everytime. log: ``` Generating random MongoDB keyfile... /bin/bash: line 9: : No such file or directory ...