mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 23:04:04 +00:00
remove nvmrc + validate input
This commit is contained in:
parent
727651b4ae
commit
8160930470
2 changed files with 4 additions and 2 deletions
1
.nvmrc
1
.nvmrc
|
@ -1 +0,0 @@
|
|||
18.18.2
|
|
@ -119,8 +119,11 @@ const cloudflaredToken = args["cloudflared-token"] || process.env.UPTIME_KUMA_CL
|
|||
|
||||
const ipsToAllow = process.env.UPTIME_KUMA_IPS_TO_ALLOW || args["ips-to-allow"] || undefined;
|
||||
if (ipsToAllow !== undefined) {
|
||||
if (typeof ipsToAllow !== "string") {
|
||||
log.error("server", "IPs to allow must be a string, " + typeof ipsToAllow + " provided");
|
||||
process.exit(1);
|
||||
}
|
||||
log.info("server", "IPs to allow: " + ipsToAllow);
|
||||
|
||||
const ipfilter = require("express-ipfilter").IpFilter;
|
||||
app.use(ipfilter(ipsToAllow.split(","), { mode: "allow" }));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue