Back

Login request blocked by CORS policy: No 'Access-Control-Allow-Origin' header

  • 0
  • Web
  • Cloud
themac
14 Dec, 2023, 07:28

How do I configure the project in my appwrite console to include the appropriate CORS headers and set up CORS rules. My current origin will be "http://localhost:3000". I've setup the Hostname as localhost in the platform settings. IDk if theyre related. Any help would be appreciated.

TL;DR
User is experiencing a CORS error when trying to login with an incorrect or missing project ID. The solution is to ensure that a Web Platform is configured with a hostname of exactly "localhost" in the appwrite console.
ideclon
14 Dec, 2023, 11:11

Yes, you need to have a Web Platform configured with a hostname of exactly localhost

Drake
14 Dec, 2023, 15:51

maybe your project ID is incorrect/missing

fafa
14 Dec, 2023, 22:30

An incorrect project id will should not give you a cors issue, cors is mostly an issue regarding the web platform not being set-up :)

ideclon
14 Dec, 2023, 22:49

If the project ID is missing or incorrect, there will be no valid platforms, therefore CORS error

fafa
14 Dec, 2023, 23:10

If it's incorrect it does not give me cors errors.

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