From c828815e8fbafc67ec9da4d4cb29cace33ca50c0 Mon Sep 17 00:00:00 2001 From: hippoz Date: Mon, 5 Oct 2020 00:20:28 +0300 Subject: [PATCH] fix variable not defined due to typo --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index bca6c32..4a8ef6c 100644 --- a/index.js +++ b/index.js @@ -65,7 +65,7 @@ const getFileType = (filename) => { const allowlist = ['https://files.hippoz.xyz', 'https://hippoz.xyz'] const corsOptions = { origin: function (origin, callback) { - if (whitelist.indexOf(origin) !== -1) { + if (allowlist.indexOf(origin) !== -1) { callback(null, true) } else { callback(new Error('Not allowed by CORS'))