![](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
- How to generate a database-setup script ...
I've written a vue.js webapp with appwrite-cloud-db (including relations) and everything works just perfectly! Now I want to release this webapp as an open sou...
- Server Error - 500 when Loading Messagin...
Hi, I'm self hosting on a VPS my appwrite database and was working towards setting up an SMTP server, when testing I got an error due to some mishaps with the S...
- Invalid token passed in the request by u...
Hi guys, I'm having this issue when passing the parameters userId and secret to **updateVerification**. I checked in Appwrite console and the email was verifie...
![](/images/bgs/pre-footer.png)