How can we conditionally append "index.html" to a request for a url that ends in a slash?
As background: We deploy multiple static, single page apps for multiple domain names to a single S3 bucket with web hosting enabled. This bucket is available as: https://our-bucket-name.s3.amazonaws.com
The bucket is organized with object key prefix so that: https://our-bucket-name.s3.amazonaws.com/environment/app_name/build_id/index.html https://our-bucket-name.s3.amazonaws.com/environment/app_name/build_id/app.css https://our-bucket-name.s3.amazonaws.com/environment/app_name/build_id/app.js
If there is a request for: https://www.example.com/ This should be routed to: https://our-bucket-name.s3.amazonaws.com/environment/app-name/build_id/index.html
If there is a request for: https://www.example.com/app.css This should be routed to: https://our-bucket-name.s3.amazonaws.com/environment/app-name/build_id/app.css
Not sure if it is relevant, but traefik here is for a kubernetes ingress that we want backed by AWS S3.
You could use AddPrefix or ReplacePath modifier, though you would also need to create a matcher on your fontend as well.
STEPS