Back

CORS Error not resolving

  • 0
  • Self Hosted
  • Flutter
  • Web
Ewyn
5 Mar, 2025, 14:31

Hello There! First off: i have followed every step of https://appwrite.io/blog/post/cors-error

The mobile Flutter app works just fine, and so does it when i test it locally. But when trying to use the actual DOmain, i get CORS errors when requesting data from Appwrite.

I have set the right prioject id, i have used the right hostname, even tried the wildcard as hostname, yet the requests keep getting blocked. For some rteason, the "Access Control Allow origin" is still set at localhost? im at my wits end and i got no clue what im doing wrong.

TL;DR
Developers are encountering CORS errors when trying to access data from Appwrite on their Flutter app. They have followed all steps but are still facing issues. The "Access Control Allow origin" is set at localhost instead of the desired domain, causing the problem.
Ewyn
5 Mar, 2025, 14:32

WHen building the App via flutter build web --release and hosting locally via serve -s, i added the localhost domain. it works via localhost and on my network via the IP

Ewyn
5 Mar, 2025, 14:33

Wait no i lied, it doesnt work again. Localhost does work, but not via the network...

Ewyn
5 Mar, 2025, 14:34

Localhost works, i get all the appwrite data im requesting. as soon as i switch to 182.168.178.80 it ceases to work and i get a COrS error.

Ewyn
5 Mar, 2025, 14:40

its not working even with a wildcard

ideclon
5 Mar, 2025, 14:56

I believe you're supposed to create a Mobile Platform with the package name?

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