oops
This commit is contained in:
parent
bbe4dc87ab
commit
677f80c760
@ -7,6 +7,6 @@ const configuration = config.util.toObject();
|
||||
export default {
|
||||
config: configuration,
|
||||
getSite: (site_url) => {
|
||||
return config.sites[site_url];
|
||||
return configuration.sites[site_url];
|
||||
}
|
||||
};
|
||||
|
@ -4,15 +4,15 @@ import config from './config.mjs';
|
||||
|
||||
// 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() {
|
||||
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) });
|
||||
}
|
||||
return Array.from(origins);
|
||||
|
Loading…
Reference in New Issue
Block a user