<div dir="ltr"><span style="font-size:12.8000001907349px">Hi,</span><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Is there a way for <span class="">nginx</span> to verify that the Content-Length header isn't exceeded by the actual size of the request body?</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Context: I'm working on an upload endpoint with a maximum upload size, and it seems that client_max_body_size only checks the Content-Length header, not the actual body. Additionally, from my testing it appears that <span class="">nginx</span> accepts the entire request body regardless of what the Content-Length is set to. I want to be able to defend against a potential slowloris-style attack where all of my workers could get tied up with overly-large uploads.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Thanks,</div><div style="font-size:12.8000001907349px">Max Rothman</div></div>