oops
This commit is contained in:
parent
bbe4dc87ab
commit
677f80c760
@ -7,6 +7,6 @@ const configuration = config.util.toObject();
|
|||||||
export default {
|
export default {
|
||||||
config: configuration,
|
config: configuration,
|
||||||
getSite: (site_url) => {
|
getSite: (site_url) => {
|
||||||
return config.sites[site_url];
|
return configuration.sites[site_url];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -4,15 +4,15 @@ import config from './config.mjs';
|
|||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
|
|
||||||
const domain = process.env.DOMAIN || config.domain || "localhost";
|
const domain = process.env.DOMAIN || config.config.domain || "localhost";
|
||||||
|
|
||||||
const port = process.env.PORT || config.port || 8080;
|
const port = process.env.PORT || config.config.port || 8080;
|
||||||
|
|
||||||
const db_path = process.env.DB || config.db_path || "ucs.db";
|
const db_path = process.env.DB || config.config.db_path || "ucs.db";
|
||||||
|
|
||||||
const cors = (function() {
|
const cors = (function() {
|
||||||
let origins = new Set();
|
let origins = new Set();
|
||||||
for (const site in config.sites) {
|
for (const site in config.config.sites) {
|
||||||
config.sites[site].cors.forEach(origin => {origins.add(origin) });
|
config.sites[site].cors.forEach(origin => {origins.add(origin) });
|
||||||
}
|
}
|
||||||
return Array.from(origins);
|
return Array.from(origins);
|
||||||
|
Loading…
Reference in New Issue
Block a user