-
Notifications
You must be signed in to change notification settings - Fork 282
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
Nginx+libmodsecurity and work with gzip #251
Comments
May be you should take a look at this: https://github.com/coreruleset/body-decompress-plugin Perhaps you will get some ideas. |
Hi, @airween |
no, just tested,
this plugin has made for mod_security2, but with few modifications it works with v3 too.
No, the author is @azurit. |
Thank you for idea)
What kind of modification was done? In plugin's description there is information "for embedded". Did you try it with reverse-proxy configuration? How fast does it work?) |
As you are running in reverse proxy mode, please see |
@azurit hello and thank you for anwer) |
Ok, so please try my plugin as @airween suggested, as far as i remember, it should work with modsec3. Note that you need support for Lua in modsec. |
@azurit thank you, i will try) |
Hello. I use Nginx 1.20.1 + libmodsecurity-3.0.4-4.el8 as reverse proxy. When we receive request with Content-Encoding: gzip and Content-Type: application/json - activate rule from default modsecurity.conf:
As I understand - we recieve data with gzip as binary content, then it send to modsecurity in binary fromat and json parser give error because data is not valid json.
I think, this is actually true for xml and any another data with compression.Is there way to work with compressed data with Modsecurity or workaround? I understand, that i can disable rule for analyze json and xml - but it's bad way, thats affect level of security.
The text was updated successfully, but these errors were encountered: