diff --git a/server.js b/server.js index 67b6be6..aa5fa50 100644 --- a/server.js +++ b/server.js @@ -105,7 +105,7 @@ const corsOptions = { callback(null, true); } else { database.system.domains((domains) => { - if (domains.indexOf(origin.replace(/:\d*$/g, "")) !== -1) { + if (config.domain == origin.replace(/:\d*$/g, "") || domains.indexOf(origin.replace(/:\d*$/g, "")) !== -1) { callback(null, true); } else { callback("Origin not allowed: " + origin);