laurilehmijoki / s3_website

Manage an S3 website: sync, deliver via CloudFront, benefit from advanced S3 website features.
Other
2.24k stars 186 forks source link

Invalidate the root /index.html when invalidating default root objs #130

Closed tombell closed 10 years ago

tombell commented 10 years ago

When using the cloudfront_invalidate_root config option, it will correctly invalidate all default root objects from /index.html to /, however this causes an issue on the root /index.html for the website, as some browsers redirect http://example.org/ to http://example.org which will request the /index.html and as this hasn't been invalidated will serve the cached index.html.

This change just adds /index.html to the paths to be invalidated if the config option is set to true

This helps somewhat with the issue #106

laurilehmijoki commented 10 years ago

Released in 2.6.1. I added a separate test case for this issue: https://github.com/laurilehmijoki/s3_website/commit/fffcb10d31e014eb4b9af32dd31cf7ac23d4451e.

Thanks for contributing!