update allowlist

This commit is contained in:
hippoz 2020-10-05 00:23:56 +03:00
parent c828815e8f
commit 36cc7470be

View file

@ -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'))
}