Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I see 5 entries in the log for each IP blocking #107

Open
alexbudin opened this issue Aug 31, 2022 · 1 comment
Open

I see 5 entries in the log for each IP blocking #107

alexbudin opened this issue Aug 31, 2022 · 1 comment

Comments

@alexbudin
Copy link

When the module blocks an IP it shows in the log 5 lines of the same message:

www > Access denied to IP address: 2a02:2f0f:*************
www > Access denied to IP address: 2a02:2f0f:*************
www > Access denied to IP address: 2a02:2f0f:*************
www > Access denied to IP address: 2a02:2f0f:*************
www > Access denied to IP address: 2a02:2f0f:*************

Any idea why this is happening?

Thank you!

@alexbudin
Copy link
Author

This is my code

let clientIp = function(req, res) {
    return req.headers['x-forwarded-for'] ? (req.headers['x-forwarded-for']).split(',')[0] : ""
}

var app = express();
app.use(
  helmet({
    contentSecurityPolicy: false,
  })
);

app.use(ipfilter(ips, { mode: 'deny', logLevel: 'deny', detectIp: clientIp }))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant