Back

CORS not working just for one bucket

  • 0
  • Flutter
  • Cloud
Tomic R.
19 Mar, 2025, 21:08

Hi! So I have the following problem: I get this CORS error in my release version: Access to XMLHttpRequest at 'https://backend.apartment.lutore.com/v1/storage/buckets/677a94a00000afff67e8/files/67db2b33001471aa50c1/view?project=6734b00f0032391c9699' from origin 'https://guide.apartment.lutore.com' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://app.apartment.lutore.com' that is not equal to the supplied origin.

Now the problem: I have set both app.apartment.lutore.com and guide.apartment.lutore.com in the console as platforms. And now to the more interesting part: Loading the data from the database etc. works with origin guide.apartment.lutore.com, but as soon as I fetch something from this storage bucket, it's not working. Thank you very much for your help!

TL;DR
Issue: CORS error occurring only for one specific bucket; possibly due to permissions or incorrect origin values set. Developers experiencing CORS error for one bucket only: 'https://backend.apartment.lutore.com/v1/storage/buckets/677a94a00000afff67e8/files/67db2b33001471aa50c1/view?project=6734b00f0032391c9699' from origin 'https://guide.apartment.lutore.com'. Policy block due to 'Access-Control-Allow-Origin' header issue. Potential Solution: - Check CORS settings for the specific bucket having issues -
Tomic R.
19 Mar, 2025, 21:08

CORS not working just for one bucket

Steven
19 Mar, 2025, 21:18

could be permissions

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