Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about changing in Use RegisterDirectiveOrder for rate_limit before basic_auth (#59) (ae5d5ea) #60

Open
ta2013 opened this issue Jul 12, 2024 · 1 comment

Comments

@ta2013
Copy link

ta2013 commented Jul 12, 2024

hi @steffenbusch
we have define some snippets of rate limits, and import those snippets at end of block as below. Then with your change, those RL will get effectively with above handle, handle_path blocks or not? Ie:

(snippet_rl){

}

site.example.com {
many handle,
handle_path here….

import snippet_rl
import compression
}
thanks.

@steffenbusch
Copy link
Contributor

Hi @ta2013,

have you used order rate_limit <before|after> <another_directive> in the global options of your Caddyfile, or have you used rate_limit within a route block? Unfortunately, your very limited Caddyfile example does not reveal this. If you need a precise answer, you will have to provide your (formatted) Caddyfile in order to see where and within which directives the snippet_rl is used.

In general (maybe this answers your question already):

  • If you use rate_limit within a route, then nothing changes for you.
  • If you have used order for rate_limit in Caddyfile global options, then nothing changes for you if you have used order rate_limit before basic_auth, as this is now the default if not specified. If you have used order for rate_limit with a different configuration, then you are still overwriting this mentioned default.

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants