mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 15:06:15 -04:00
Fix ReferenceError: ipv6_lcl is not defined
This commit is contained in:
parent
c9e1c2504a
commit
b106d90b64
1 changed files with 4 additions and 3 deletions
7
index.js
7
index.js
|
@ -96,14 +96,15 @@ if (debugMode) {
|
||||||
console.log("DEBUG_MODE is active. To protect privacy, do not use in production.")
|
console.log("DEBUG_MODE is active. To protect privacy, do not use in production.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let ipv6_lcl;
|
||||||
if (process.env.IPV6_LOCALIZE) {
|
if (process.env.IPV6_LOCALIZE) {
|
||||||
let ipv6_lcl = parseInt(process.env.IPV6_LOCALIZE);
|
ipv6_lcl = parseInt(process.env.IPV6_LOCALIZE);
|
||||||
if (!ipv6_lcl || !(0 < ipv6_lcl && ipv6_lcl < 8)) {
|
if (!ipv6_lcl || !(0 < ipv6_lcl && ipv6_lcl < 8)) {
|
||||||
console.error("IPV6_LOCALIZE must be an integer between 1 and 7");
|
console.error("IPV6_LOCALIZE must be an integer between 1 and 7");
|
||||||
return;
|
return;
|
||||||
} else {
|
|
||||||
console.log("IPv6 client IPs will be localized to", ipv6_lcl, ipv6_lcl > 1 ? "segments" : "segment");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("IPv6 client IPs will be localized to", ipv6_lcl, ipv6_lcl === 1 ? "segment" : "segments");
|
||||||
}
|
}
|
||||||
|
|
||||||
app.use(function(req, res) {
|
app.use(function(req, res) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue