diff options
author | Kenny Ballou <kballou@devnulllabs.io> | 2018-08-20 19:08:22 -0600 |
---|---|---|
committer | Kenny Ballou <kballou@devnulllabs.io> | 2018-08-20 19:09:21 -0600 |
commit | 547fba14eea012eb32fefab6f32a4c0ad1bf9e19 (patch) | |
tree | 63e95905664a757f4c61d44778ef3257c4430f21 | |
parent | 655ef46f50d95209c39da1aa26a2d1c520b77193 (diff) | |
download | kennyballou.com-547fba14eea012eb32fefab6f32a4c0ad1bf9e19.tar.gz kennyballou.com-547fba14eea012eb32fefab6f32a4c0ad1bf9e19.tar.xz |
Update and reformat whitelist
Add `.ico`, `.ogg`, and `.asc` files to the whitelist.
Signed-off-by: Kenny Ballou <kballou@devnulllabs.io>
-rw-r--r-- | stacks/uri-rewrite.in | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/stacks/uri-rewrite.in b/stacks/uri-rewrite.in index 6df707c..83a391d 100644 --- a/stacks/uri-rewrite.in +++ b/stacks/uri-rewrite.in @@ -2,7 +2,19 @@ {"Fn::Join": ["\n", [ "'use strict';", "exports.handler = (event, context, callback) => {", - " var whitelist = ['css', 'html', 'jpg', 'svg', 'png', 'txt', 'xml', 'pdf'];", + " var whitelist = [", + " 'html',", + " 'css',", + " 'jpg',", + " 'svg',", + " 'png',", + " 'txt',", + " 'xml',", + " 'pdf',", + " 'ico',", + " 'ogg',", + " 'asc'", + " ];", " var request = event.Records[0].cf.request;", " var extension = request.uri.split('.').pop();", " if (typeof extension == 'undefined' || !whitelist.includes(extension)) {", |