From a87295bf0b56ef3bc0a84abea02314e4fcd94ba8 Mon Sep 17 00:00:00 2001 From: Alex Bradbury Date: Wed, 14 Sep 2022 05:06:00 +0100 Subject: [PATCH] docs: Clarify how handle directives may be re-ordered (#264) As discussed in . --- src/docs/markdown/caddyfile/directives/handle.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/markdown/caddyfile/directives/handle.md b/src/docs/markdown/caddyfile/directives/handle.md index 8c31e63..97f11b3 100644 --- a/src/docs/markdown/caddyfile/directives/handle.md +++ b/src/docs/markdown/caddyfile/directives/handle.md @@ -6,7 +6,7 @@ title: handle (Caddyfile directive) Evaluates a group of directives mutually exclusively from other `handle` blocks at the same level of nesting. -The `handle` directive is kind of similar to the `location` directive from nginx config: the first matching `handle` block will be evaluated. Handle blocks can be nested if needed. Only HTTP handler directives can be used inside handle blocks. +The `handle` directive is kind of similar to the `location` directive from nginx config: the first matching `handle` block will be evaluated. `handle` directives at the same level of nesting will be tried in the order they're written in the `Caddyfile`, except if there is a single path matcher, which orders them by longest (most specific) path pattern first. Handle blocks can be nested if needed. Only HTTP handler directives can be used inside handle blocks. ## Syntax