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
- 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 ...
- Auth broken after update from 1.8.0 to 1...
So ive been having issues creating, deleting or updating users on my appwrite instance after i updated from 1.8.0 to version 1.9.0. When trying to create a user...