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
- SSL Certificate Issuance Failed
When we first deployed our site using appwrite and a custom domain everything was working, but it seems like the SSL certificate never got renewed. I tried dele...
- function subdomain ssl certs
The generated subdomain isn't getting a valid ssl cert, I was wondering if appwrite automatically generates one or uses a wildcard for *.functions.domain.com? ...
- Searching by attribute "name" requires a...
I have a table "products" with a few columns I'm trying to search by, but I get this error: ```json { "message": "Searching by attribute \"name\" requires a...