From 36cc7470be13a525725d283d95dba84b2fbb8e50 Mon Sep 17 00:00:00 2001 From: hippoz Date: Mon, 5 Oct 2020 00:23:56 +0300 Subject: [PATCH] update allowlist --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 4a8ef6c..02ba99f 100644 --- a/index.js +++ b/index.js @@ -62,11 +62,11 @@ const getFileType = (filename) => { return type; }; -const allowlist = ['https://files.hippoz.xyz', 'https://hippoz.xyz'] +const allowlist = ['https://files.hippoz.xyz/', 'https://hippoz.xyz/', 'https://files.hippoz.xyz', 'https://hippoz.xyz'] const corsOptions = { origin: function (origin, callback) { if (allowlist.indexOf(origin) !== -1) { - callback(null, true) + callback(null, true) } else { callback(new Error('Not allowed by CORS')) }