Mholt/caddy-ratelimit handle/matchers

According to Location of rate_limit directive, the module mholt/caddy-ratelimit can rate-limit certain paths using an inline matcher.

rate_limit /api/* {
	zone api {
		key static
		events 25
		window 1s

Is there a way to inverse this behavior and to rate-limit every path except /api/* ? Thank you.

Use a not matcher:

@notAPI not path /api/*
rate_limit @notAPI {

This topic was automatically closed after 30 days. New replies are no longer allowed.