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

filtering large request with help of content-length is not working #220

Open
nedy13 opened this issue Aug 17, 2017 · 0 comments
Open

filtering large request with help of content-length is not working #220

nedy13 opened this issue Aug 17, 2017 · 0 comments

Comments

@nedy13
Copy link

nedy13 commented Aug 17, 2017

I use the following rule and want to block all requests greater 2MB. I tested a lot and found out that the operator function is not working correctly. It always compares via string equal. When I configured a known content-length value and this matches exactly the value, I receive a 413 error.

<rule>
<name>BlockLargeRequests</name>
<condition name="content-length" operator="greater">2097152</condition>
<set type="status">413</set>
<to last="true">null</to>
</rule>

The status page show me the following:

BlockLargeRequests (rule 1)

URL's matching ^(.*)$ will be forwarded to null.

This rule and it's conditions will use the regex matching engine.

Given that the following condition is met.

The content-length HTTP header matches the value 2097152

This rule will set:

status to 413
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