Back

"Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at "

  • 0
  • Self Hosted
  • Web
  • Storage
rovolt.
26 Mar, 2024, 21:27

Hello, I'm self hosting a project via docker on a linux server. Just noticed a weird issue. While it works on my laptop to open a page of my project (using Sveltekit) and upload files to a storage bucket I get this error trying the exact same on my phone Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at .../storage/bucket/... I'm using Firefox on both devices and they are in the same network/wifi. There is no localhost involved. I'm calling the exact same url on my server.

TL;DR
Developers are facing a Cross-Origin Request Blocked error when trying to upload files to a storage bucket from a Sveltekit project on a Linux server. The issue occurs on the phone but not on the laptop, even when both devices are using the same network and browser (Firefox). The error indicates a problem with the Same Origin Policy. To fix this, developers should ensure proper CORS headers are set on the server to allow the request from the phone.
rovolt.
26 Mar, 2024, 21:35

Btw. opening that page on my phones browser works fine. Just the call to upload files to the storage bucket causes the CORS issue.

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