Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Refactoring code. #522

Merged
merged 7 commits into from
Sep 23, 2020
Merged

Refactoring code. #522

merged 7 commits into from
Sep 23, 2020

Conversation

wargio
Copy link
Contributor

@wargio wargio commented Sep 23, 2020

This is a major refactoring to optimize the code.

Removed:

  • WhitelistFile

Introduced:

  • IgnoreIP
  • IgnoreCIDR

Support also for IPv6 (IPs and CIDR)

Added support for json value escaping supporting non printable chars.

Before to whitelist ips to not be blocked by NAXSI

WhitelistFile "/path/to/whitelist.txt"

Now:

IgnoreIP   "1.2.3.4"
IgnoreIP   "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
IgnoreCIDR "192.168.0.0/24"
IgnoreCIDR "2002::1234:abcd:ffff:c0a8:101/64"

You can use the include directive to achieve the same effect as WhitelistFile "/path/to/whitelist.txt"

Giovanni Dante Grazioli added 4 commits September 23, 2020 15:23

Verified

This commit was signed with the committer’s verified signature.
Ulincsys John McGinness

Verified

This commit was signed with the committer’s verified signature.
Ulincsys John McGinness
@wargio
Copy link
Contributor Author

wargio commented Sep 23, 2020

@marcinguy i decided to refactor your code to simplify by using the include instead of your solution. it's more nginx-like

@wargio wargio merged commit 99755ea into master Sep 23, 2020
@wargio wargio deleted the refactoring branch September 23, 2020 15:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant