directoryserver: allowlist always needs a single IP/range
This commit is contained in:
@@ -39,7 +39,7 @@ async function getConfig() {
|
||||
if (value === null) return {
|
||||
enabled: false,
|
||||
secret: '',
|
||||
allowlist: '' // empty means allow all
|
||||
allowlist: ''
|
||||
};
|
||||
|
||||
return JSON.parse(value);
|
||||
@@ -97,8 +97,7 @@ async function setConfig(directoryServerConfig, auditSource) {
|
||||
const config = {
|
||||
enabled: directoryServerConfig.enabled,
|
||||
secret: directoryServerConfig.secret,
|
||||
// if list is empty, we allow all IPs
|
||||
allowlist: directoryServerConfig.allowlist || ''
|
||||
allowlist: directoryServerConfig.allowlist
|
||||
};
|
||||
|
||||
await validateConfig(config);
|
||||
|
||||
Reference in New Issue
Block a user