Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalidate index.html root paths (foo/index.html and foo/ and foo) #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GussieTech
Copy link

I use Lambda Edge to make it accessible without /index.html or /. So, I would like to invalidate also "no slash" at the time of deployment. I think this purpose like #10.

@@ -69,6 +69,7 @@ module.exports = function (options) {
files.push(path);
if (options.indexRootPath && /index\.html$/.test(path)) {
files.push(path.replace(/index\.html$/, ''));
files.push(path.replace(/\/index\.html$/, ''));
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to add this and invalidate "no slash".

@@ -69,6 +69,7 @@ module.exports = function (options) {
files.push(path);
if (options.indexRootPath && /index\.html$/.test(path)) {
files.push(path.replace(/index\.html$/, ''));
files.push(path.replace(/\/index\.html$/, ''));
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CloudFront Invalidation

As shown below, Invalidate was executed.

/about
/about/
/about/index.html
/contact
/contact/
/contact/index.html
/cookie-policy
/cookie-policy/
/cookie-policy/index.html
/create
/create/
/create/index.html
/features
/features/
/features/index.html
...

@GussieTech GussieTech marked this pull request as ready for review July 29, 2019 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant