clevercanary / data-browser

Apache License 2.0
2 stars 0 forks source link

Modify entity folder structure to be compatible with S3 deploy #224

Open NoopDog opened 2 years ago

NoopDog commented 2 years ago

UPDATE - Not sure if this is required. Hold for now.

Need

The project is deployed in an S3 bucket. S3 has specific rules to try to resolve paths depending on if the path ends in a / or not. We normalize this by always adding a trialing slash if it's needed in CloudFront. This leaves us with the following behavior we need to be in alignment with:

amazon.com/photos/ resolves to amazon.com/photos/index.html

https://docs.aws.amazon.com/AmazonS3/latest/userguide/IndexDocumentSupport.html

In our case, we have a file for each configured entity. Currently, the file is named after the entity and located in the top-level folder.

Approach

@BruceRodrigues I need your advice here on how to do this.

DOD

for each entity list page, we have a entityName/index.html file instead of an enttiyName.html file.

so instead of:

files.html we have /files/index.html.

NoopDog commented 2 years ago

@Bruce Rodrigues, I fixed the above issue with a CloudFront function for the time being. No action is required on your part for now. Thanks!