CORS errors usually happen because the project is missing a web platform that allows the app to connect to it. To add a web platform:
Besides the web platform, other reasons you may get this error are:
Reference: https://appwrite.io/blog/post/cors-error