
am trying to follow a Next.js tutorial with Appwrite as the backend, but I am getting a cross-origin error when I try to save data.
This is what I receive in the console
HTTP/2 204 access-control-allow-credentials: true access-control-allow-headers: Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-Appwrite-JWT, X-Appwrite-Response-Format, X-Appwrite-Timeout, X-SDK-Version, X-SDK-Name, X-SDK-Language, X-SDK-Platform, X-SDK-GraphQL, X-Appwrite-ID, X-Appwrite-Timestamp, Content-Range, Range, Cache-Control, Expires, Pragma, X-Appwrite-Session, X-Fallback-Cookies, X-Forwarded-For, X-Forwarded-User-Agent access-control-allow-methods: GET, POST, PUT, PATCH, DELETE access-control-allow-origin: http://localhost:3000 access-control-expose-headers: X-Appwrite-Session, X-Fallback-Cookies content-type: text/html date: Fri, 16 Aug 2024 15:07:49 GMT server: Appwrite x-debug-speed: 0.0015490055084229 content-length: 0 OPTIONS /v1/databases/66be54550000ecb0adca/collections/66be548300167773f11c/documents HTTP/2 Host: cloud.appwrite.io User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0 Accept: / Accept-Language: it-IT,it;q=0.8,en-US;q=0.5,en;q=0.3 Accept-Encoding: gzip, deflate, br, zstd Access-Control-Request-Method: POST Access-Control-Request-Headers: content-type,user-agent,x-appwrite-key,x-appwrite-project,x-appwrite-response-format,x-sdk-language,x-sdk-name,x-sdk-platform,x-sdk-version Referer: http://localhost:3000/ Origin: http://localhost:3000 Connection: keep-alive Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: cross-site Priority: u=4 TE: trailers
I have already set up the platform on Appwrite on localhost.
Recommended threads
- Sharing cookies
Hi, I’m using Appwrite Cloud, and I have a setup where my Appwrite backend is hosted on a subdomain (e.g., api.example.com), while my frontend (Next.js app) and...
- Organization not exists anymore
Hello! We have a problem with a cloud database. We are on the Free plan, but after a refresh the site wants me to create a new organisation, and I not see the c...
- JSON and Object Support in Collection do...
I am working with Next.Js and Appwrite Cloud, I am relatively New to Appwrite but i have noticed there is no direct support of JSON and Object support in attrib...
