server.js aktualisiert
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Artem Anufrij 2024-02-21 21:57:21 +01:00
parent 2235372c64
commit c07984c506

View File

@ -105,7 +105,7 @@ const corsOptions = {
callback(null, true); callback(null, true);
} else { } else {
database.system.domains((domains) => { 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); callback(null, true);
} else { } else {
callback("Origin not allowed: " + origin); callback("Origin not allowed: " + origin);