Back

how can i update CORS policy to allow requests from my Netlify site

  • 0
  • Web
Henry_Dustin
2 Nov, 2023, 20:12

please someone should help me i deploy my real time chatting app but resquest is blocked due to cors policy

TL;DR
Issue: How to update CORS policy to allow requests from my Netlify site Solution: 1. Access the Appwrite Console. 2. Locate the Platform tab. 3. Add the URL of your Netlify site ('https://main--verdant-marigold-273f1c.netlify.app') as an allowed origin. 4. Save the changes. 5. Test if the CORS policy is updated and requests are allowed from your Netlify site.
ideclon
2 Nov, 2023, 20:19

You need to add a Platform from the Appwrite Console

Henry_Dustin
2 Nov, 2023, 20:20

please direct me on how to do it

ideclon
2 Nov, 2023, 20:29
Henry_Dustin
2 Nov, 2023, 20:33

i created a real time messaging app using react and i deploy it using netlify but i got this errors if user what to login, register

ideclon
2 Nov, 2023, 20:33

You need to add a Platform

Henry_Dustin
2 Nov, 2023, 20:33

Access to XMLHttpRequest at 'https://cloud.appwrite.io/v1/account' from origin 'https://main--verdant-marigold-273f1c.netlify.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. cloud.appwrite.io/v1/account:1

TypeScript
   Failed to load resource: net::ERR_FAILED
Henry_Dustin
2 Nov, 2023, 20:33

this is the error

Henry_Dustin
2 Nov, 2023, 20:34

how can i locate the platform

ideclon
2 Nov, 2023, 20:35

This error means you didn't add a Platform in the Appwrite Console

Henry_Dustin
2 Nov, 2023, 20:35

alright sir, can u tell me how i can add it

ideclon
2 Nov, 2023, 20:46

@Henry_Dustin

Henry_Dustin
2 Nov, 2023, 20:54

thanks bro

Henry_Dustin
2 Nov, 2023, 20:54

i have done it

Drake
2 Nov, 2023, 23:50

is your problem solved?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more