Skip to content

Commit 630bc53

Browse files
committed
feat: suport multible key exclude patterns
1 parent fb2cd0e commit 630bc53

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// bucketUrl defaults to this file location
88
// ensure it's on bucket root leve level (e.g. key: 'index.html')
99
// bucketUrl: https://s3.eu-central-1.amazonaws.com/example-bucket
10-
keyExcludePattern: /^index\.html$/,
10+
keyExcludePatterns: [ /^index\.html$/ ],
1111
pageSize: 50,
1212
title: 'AWS S3 Bucket Browser',
1313
subtitle: 'made with ♥ by qoomon',
@@ -344,7 +344,7 @@ <h2 class="subtitle">{{config.subtitle}}</h2>
344344
});
345345
});
346346
contents
347-
.filter(content => !config.keyExcludePattern || !content.key.match(config.keyExcludePattern))
347+
.filter(content => !config.keyExcludePatterns.find(pattern => pattern.test(content.key)))
348348
.forEach(content => {
349349
if(content.key.endsWith('/') && !content.size){
350350
if(content.key !== this.pathPrefix)

0 commit comments

Comments
 (0)