Conversation

nginx's limit_req runs very early in the request and $request_body only exists much later. That variable also only exists if you use a reverse proxy via proxy_pass, fastcgi_pass, etc. Have to get the value out of request body with map, add as a header and reverse proxy to itself.
1
1
Replying to
For some reason nginx doesn't parse h and d for limit_req even though it supports them elsewhere. That's a bit annoying since I would have wanted to make it 1r/h or lower. There's a patch for adding support but I'd rather not have to use a patch. Kinda the point of doing this.
2