
I have a signup page that works fine on http://localhost:3000/, but returns the following error on http://192.168.2.122:3000/:
appwrite.js?v=5de0b309:445 POST https://cloud.appwrite.io/v1/account net::ERR_FAILED 403 (Forbidden)
Access to XMLHttpRequest at 'https://cloud.appwrite.io/v1/account' from origin 'http://192.168.2.122:3000' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'http://localhost:3000' that is not equal to the supplied origin.
I tried whitelisting 192.168.2.122 under hostnames in AppWrite Cloud, but the issue remains.
How to fix this?

You need to add a Platform in Appwrite

Thanks for your reply. I have a Platform set up: WEB

So itโs working now?

No

Did you add the web platform with or without port?

Also is the IP 192.168.x.xxx in the hostname part under platforms?

Heyy ๐ To get rid of CRORS error, you need to create a web platform in your project. You can set name to anything, but hostname in your case needs to be exactly 192.168.2.122
- no port, no protocols, no slashes.
If that doesnt help, please check value you pass into setProject
in Appwrite SDK. If project ID is empty, or has wrong project ID value, CORS error can also be present. You can find your project ID in settings screen (button to get there is bottom left)
Recommended threads
- Subdomain failed verification
So I wanted to do a custom subdomain, because local storage doesn't work for me, but I've tried it a long time ago, it didn't work for me, and now I'm trying ag...
- [Node.js SDK] Bypass 2GB file limit?
Hello. Using either InputFile.fromPath or InputFile.fromBuffer throws this error: File size (2295467305) is greater than 2 GiB Bucket limit etc. is setup corre...
- Relationship null, even when relationshi...
Hi Everyone, im experiencing issues with set relation data. When im setting the document id from the related database most of them seem fine, except one table. ...
