
I'm trying to add a accountCreate mutation from my local environment to my cloud project.
I keep getting the following error.
Access to XMLHttpRequest at 'https://cloud.appwrite.io/v1/graphql/mutation' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Project hostname is set to localhost
My NextJs middleware follows NextJS CORS middleware template: https://nextjs.org/docs/app/building-your-application/routing/middleware#cors
with
const allowedOrigins = ["https://cloud.appwrite.io", "http://localhost:3000"]
export const config = {
matcher: "/:path*",
}
This should be working... Any ideas why it doesn't?
I am logging the Project ID in the client setup in the code, and it matches the one in the cloud.

have you added a platform for localhost in the appwrite console?

Yes I did!
Recommended threads
- how many Teams can be created?
I am creating an app where I will let users create groups. This could mean there will be many groups created by user, to isolate those groups properly I am thin...
- React native app login via Safari
Hi! I deployed for debug my React Native app in web, chrome everythink works well but in safari on mac and ios I cant login. I found this one error in safari co...
- Error Generation of certification for cu...
Hi, I tried to connect a custom domain, this worked but creating the certification afterwards fails with the following error: ```txt Failed to create TLS subsc...
