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
Since it's a header, it can implement a rate limit with the email as the key for the rate limit zone once it proxies it to itself. Flarum treats the email value as an exact string so it can't be bypassed by adding whitespace, etc. Only problem is that 1r/m is the lowest rate.
1
2