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

Support CIDR notation in global / per-site decision list #22

Merged
merged 31 commits into from
Jun 23, 2022

Conversation

jeremy5189
Copy link
Contributor

@jeremy5189 jeremy5189 commented Jun 14, 2022

  • Support CIDR notation in global / per-site decision list using forked version of ipfilter package (github.com/jeremy5189/ipfilter-no-iploc)
  • Support global decision list (whitelist) in regex banner to prevent empty regex ban log
  • E2E testing for above
  • Use gin.CustomRecovery() to handle panic, redirect to nginx @fail_open and log error to X-Banjax-Error
  • Change HTTP status code to the following page
    • 429 for sha_inv challenge page
    • 401 for password protection page (not changed)
  • Log banjax decision in banjax log, with existing column action

@mhqz
Copy link
Contributor

mhqz commented Jun 14, 2022

I think the patch is going on the right direction. Please feel free to ping me if you want me to review it again before its merged.

Copy link
Contributor

@mhqz mhqz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look fine to me, I just added a comment for validating corner cases of specific blocking rules.

internal/http_server.go Show resolved Hide resolved
Implement global whitelist in regex banner
@jeremy5189 jeremy5189 changed the title WIP: Bug/decision list ip mask Bug/decision list ip mask Jun 23, 2022
@jeremy5189 jeremy5189 changed the title Bug/decision list ip mask Support CIDR notation in global / per-site decision list Jun 23, 2022
@jeremy5189 jeremy5189 merged commit f4b30e3 into main Jun 23, 2022
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

Successfully merging this pull request may close these issues.

2 participants