Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var cfSettings = {
sessionToken: '...', // Optional AWS Session Token
wait: true, // Whether to wait until invalidation is completed (default: false)
originPath: '/app', // Configure OriginPath to be removed of file path to invalidation
indexRootPath: true // Invalidate index.html root paths (`foo/index.html` and `foo/`) (default: false)
indexRootPath: true // Invalidate index.html root paths (`foo/index.html` and `foo/` and `foo`) (default: false)
}

gulp.task('invalidate', function () {
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
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".

}

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
...

break;
case 'cache':
Expand Down