Back

Storage View error with custom domain

  • 1
  • Web
  • Storage
  • Cloud
Fede_
2 Sep, 2024, 20:42

Hi, I realized that after setting up a custom domain for appwrite, the file views no longer work.

I use appwrite cloud and a domain on aruba.com.

I set the cname and confirmed on appwrite console, all ok, the rest of the functionality works fine.

However, when I try to open an image view from a bucket, using cloud.appwrite.io I can see it, using my domain I get:

TypeScript
{"message":"The current user is not authorized to perform the requested action.","code":401,"type":"user_unauthorized","version":"1.6.0"}

this work fine:

TypeScript
https://cloud.appwrite.io/v1/storage/buckets/6XXXXXXX12f/files/66XXXXXX56f/view?project=66XXXXX

this not

TypeScript
https://backend.mydomain./v1/storage/buckets/6XXXXXXX12f/files/66XXXXXX56f/view?project=66XXXXX

Anyway, this is the security bucket configuration:

TL;DR
Developers experiencing issues with custom domain setup in Appwrite cloud. After setting up a custom domain on aruba.com, file views stopped working correctly. When attempting to view images in buckets using the custom domain, a 401 error is returned, stating the current user is unauthorized. The issue seems to be related to the security bucket configuration not recognizing the custom domain.
Fede_
2 Sep, 2024, 20:44

I tried opening the url from both the web console and the web sdk. Same problem.

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