directoryserver: allowlist always needs a single IP/range

This commit is contained in:
Girish Ramakrishnan
2024-01-13 12:30:39 +01:00
parent b8c297b178
commit b57ad9b8c1

View File

@@ -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);