Access to XMLHttpRequest at 'https://cloud.appwrite.io/v1/databases/66387c50002eb78ca32f/collections/66387c5d003a16f1ed53/documents?queries%5B0%5D=orderDesc%28%22%24createdAt%22%29' from origin 'https://todo-list-vert-omega-47.vercel.app' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://localhost' that is not equal to the supplied origin. I'm getting this error , It working with localhost correctly but i'm want to use with vercel , deployed on vercel with correct URL and project_id , but Idk why its occuring can anyone fix this ?
This
export const AppwriteURL =
import.meta.env.VITE_APPWRITE_URL || "https://cloud.appwrite.io/v1";
export const PORJECT_ID =
import.meta.env.VITE_APPWRITE_DATABASES_ID || "66387c2d00392835a51c";
export const DATABASES_ID =
import.meta.env.VITE_APPWRITE_DATABASES_ID || "66387c50002eb78ca32f";
export const COLLECTION_MESSAGE_ID =
import.meta.env.VITE_APPWRITE_COLLECTION_MESSAGE_ID || "66387c5d003a16f1ed53";
export const client = new Client();
client.setEndpoint(AppwriteURL).setProject(PORJECT_ID);
export const databases = new Databases(client);
``` aapwriteConfig.js file
Github repositories - https://github.com/ankit3354/Todo-List.git
VITE_APPWRITE_URL = "https://cloud.appwrite.io/v1"
VITE_APPWRITE_DATABASES_ID ='66387c50002eb78ca32f'
VITE_APPWRITE_COLLECTION_MESSAGE_ID ='66387c5d003a16f1ed53'```
env file
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....
- CORS error using the Locale API from a b...
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/.....