Skip to content

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

Open
GussieTech wants to merge 1 commit into
lpender:masterfrom
GussieTech:master
Open

Invalidate index.html root paths (foo/index.html and foo/ and foo)#24
GussieTech wants to merge 1 commit into
lpender:masterfrom
GussieTech:master

Conversation

@GussieTech

Copy link
Copy Markdown

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.

Comment thread index.js
files.push(path);
if (options.indexRootPath && /index\.html$/.test(path)) {
files.push(path.replace(/index\.html$/, ''));
files.push(path.replace(/\/index\.html$/, ''));

Copy link
Copy Markdown
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".

Comment thread index.js
if (options.indexRootPath && /index\.html$/.test(path)) {
files.push(path.replace(/index\.html$/, ''));
files.push(path.replace(/\/index\.html$/, ''));
}

Copy link
Copy Markdown
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