when running under K8S set JAMBONES_NETWORK_CIDR as private ip address space

This commit is contained in:
Dave Horton
2025-11-24 11:25:29 -06:00
parent 9c6134d5dc
commit c4278be34d

3
app.js
View File

@@ -126,7 +126,8 @@ srf.locals = {
writeAlerts, writeAlerts,
AlertType AlertType
}; };
const cidrs = process.env.JAMBONES_NETWORK_CIDR const cidrsEnv = process.env.JAMBONES_NETWORK_CIDR || '192.168.0.0/24,172.16.0.0/16,10.0.0.0/8';
const cidrs = cidrsEnv
.split(',') .split(',')
.map((s) => s.trim()); .map((s) => s.trim());
const matcher = new CIDRMatcher(cidrs); const matcher = new CIDRMatcher(cidrs);