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
- Appwrite behind Nginx, locale.get() retu...
I have Appwrite behind Nginx and followed this guide to forward the real user IP: https://medium.com/@stnguyen90/how-to-run-appwrite-behind-nginx-19348ed34243 ...
- [BUG] After 1.8.0 no Screenshots of Site...
Hello, I'm facing this bug. When I deploy it works properly but screenshots are not displayed. If I open the image this is the result: URL: `https://appw.xxxx....
- Transaction error
Future createOperations() async { final client = Client() .setEndpoint(AppwriteConstants.apiEndPoint) .setProject(AppwriteConstants.projectI...