Hello! On Thu, Dec 15, 2022 at 09:50:46AM -0300, Rejaine Monteiro wrote:
> Hello!! > > I need apply different limit_req rules with different rules, like > > limit_req_zone $binary_remote_addr zone=ipsrc:10m rate=1r/s; > limit_req_zone $arg_token zone=apitoken:10m rate=5r/m; > limit_req_zone $http_autorization zone=httpauth:10m rate=5r/s; > > server { > listen 443; > server_name api.domain.com; > } > > location / { > limit_req zone=ipsrc; > limit_req zone=apitoken; > limit_req zone=httpauth; > proxy_pass http://internal.api.com; > } > } > > Would this be correct and should it work as expected? This is certainly supported, see http://nginx.org/r/limit_req for details. Note that it might be a good idea to add some meaningful "burst" to the configuration, as well as "nodelay". -- Maxim Dounin http://mdounin.ru/ _______________________________________________ nginx mailing list nginx@nginx.org https://mailman.nginx.org/mailman/listinfo/nginx