title: NGINX enable rate limiting only on successful requests
body: <p>Is there are a way to enable rate limiting only for successful requests (i.e. HTTP status code 200)?</p>
  
  <p>For example, in the following snippet from my configuration...</p>
  
  <pre><code>http {
      limit_req_zone $binary_remote_addr zone=test:10m rate=2r/m;
  
      server {
          location / {
               limit_req zone=test;
               proxy_pass http://localhost:3000/;
               ...
          }
  
          ...
      }
  
      ...
  }
  </code></pre>
  
  <p>...requests are successfully rate limited (up to two requests per minute).</p>
  
  <p>However, as this is for a contact form which sends me emails, I do not care about rate limiting if <code>http://localhost:3000/</code> returns an error as no email will have been sent.</p>