mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-29 14:18:26 +02:00
Format
This commit is contained in:
parent
5e92aebd20
commit
bbc1a9eac4
1 changed files with 11 additions and 11 deletions
|
@ -491,13 +491,13 @@ async function checkRules(
|
||||||
for (const rule of rules) {
|
for (const rule of rules) {
|
||||||
if (
|
if (
|
||||||
(clientIp &&
|
(clientIp &&
|
||||||
rule.match == "CIDR" &&
|
rule.match == "CIDR" &&
|
||||||
isIpInCidr(clientIp, rule.value) &&
|
isIpInCidr(clientIp, rule.value) &&
|
||||||
rule.action === "DROP") ||
|
rule.action === "DROP") ||
|
||||||
(path &&
|
(path &&
|
||||||
rule.match == "PATH" &&
|
rule.match == "PATH" &&
|
||||||
urlGlobToRegex(rule.value).test(path) &&
|
urlGlobToRegex(rule.value).test(path) &&
|
||||||
rule.action === "DROP")
|
rule.action === "DROP")
|
||||||
) {
|
) {
|
||||||
return "DROP";
|
return "DROP";
|
||||||
}
|
}
|
||||||
|
@ -514,11 +514,11 @@ async function checkRules(
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(clientIp &&
|
(clientIp &&
|
||||||
rule.match == "CIDR" &&
|
rule.match == "CIDR" &&
|
||||||
isIpInCidr(clientIp, rule.value)) ||
|
isIpInCidr(clientIp, rule.value)) ||
|
||||||
(path &&
|
(path &&
|
||||||
rule.match == "PATH" &&
|
rule.match == "PATH" &&
|
||||||
urlGlobToRegex(rule.value).test(path))
|
urlGlobToRegex(rule.value).test(path))
|
||||||
) {
|
) {
|
||||||
return "ACCEPT";
|
return "ACCEPT";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue