![](https://cdn.discordapp.com/avatars/134685369315753984/76fef28c430e98c0eec185b5d92ec679.webp)
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.
![](https://cdn.discordapp.com/avatars/186656408450629633/ca3bdd514fde110c200d8e9cff0c1328.webp)
have you added a platform for localhost in the appwrite console?
![](https://cdn.discordapp.com/avatars/134685369315753984/76fef28c430e98c0eec185b5d92ec679.webp)
Yes I did!
Recommended threads
- Appwrite blocks *.vercel.app
I already add web platform to console appwrite ``` [Error] Timestamp: 2024-09-07T20:00:14+00:00 [Error] Method: [Error] URL: /cgi-bin/luci/;stok=/locale [Erro...
- Error uploading more than 1MB
- Access blocked by CORS policy
Getting the following error message while uploading or updating image files at Appwrite Storage. ``` Access to XMLHttpRequest at 'https://cloud.appwrite.io/v1/...
![](/images/bgs/pre-footer.png)