mirror of
https://github.com/smogon/pokemon-showdown-loginserver.git
synced 2026-04-26 01:31:42 -05:00
Move hardcodes to config-example
This commit is contained in:
parent
56de3d2d64
commit
c8686db905
|
|
@ -15,6 +15,13 @@ exports.routes = {
|
|||
root: "pokemonshowdown.com",
|
||||
};
|
||||
|
||||
exports.mainserver = 'showdown';
|
||||
exports.serverlist = '/var/www/html/play.pokemonshowdown.com/config/servers.inc.php';
|
||||
|
||||
exports.autolockip = [];
|
||||
exports.compromisedkeys = [];
|
||||
exports.trustedproxies = [];
|
||||
|
||||
/**
|
||||
* [Places to allow cors requests from, prefix to use][]
|
||||
* @type {[RegExp, string][]}
|
||||
|
|
|
|||
|
|
@ -26,16 +26,6 @@ export function load(invalidate = false): Configuration {
|
|||
fs.readFileSync(path.resolve(__dirname, '../config/config-example.js'))
|
||||
);
|
||||
}
|
||||
if (!config.mainserver) {
|
||||
config.mainserver = 'showdown';
|
||||
}
|
||||
if (!config.serverlist) {
|
||||
config.serverlist = '/var/www/html/play.pokemonshowdown.com/config/servers.inc.php';
|
||||
}
|
||||
const needsSet = ['autolockip', 'sysops', 'trustedproxies', 'compromisedkeys'] as const;
|
||||
for (const key of needsSet) {
|
||||
if (!config[key]) config[key] = [];
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user