Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Custom domain name for Spaces shows list of all files
I currently have a DigitalOcean Space for Object Storage in which I store pictures. Access to the files is set to Restricted in the admin panel, so when I go to myproject.ams3.digitaloceanspaces.com, I recieve the “Permission Denied” message as expected. However, I followed this guide to route files.myproject.com over a secure connection (https). This works flawlessly and routes https://files.myproject.com/image.jpg to the image in my Space.
However, the problem is, when I go to files.myproject.com, I can see a list of all the files, similarly to what I see when I set the access to “Public” in my admin panel. However it seems to be an index created by AWS. I use node.js to upload using S3 but I don’t think that’s causing this to show up?
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Name>myproject</Name> <Prefix/> <Marker/> <MaxKeys>1000</MaxKeys> <IsTruncated>false</IsTruncated> <Contents> <Key>image.jpg</Key> <LastModified>2019-02-25T15:20:18.675Z</LastModified> <ETag>"*******"</ETag> <Size>294316</Size> <StorageClass>STANDARD</StorageClass> <Owner> <ID>********</ID> <DisplayName>********</DisplayName> </Owner> </Contents>
If someone could point me in the right direction as to how to hide those files.. that would be nice!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×