httpcaddyfile: Fix sorting of repeated directives

Fixes #5037
This commit is contained in:
Matthew Holt 2022-09-13 13:43:21 -06:00
parent 20d487be57
commit 754fe4f7b4
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5
4 changed files with 49 additions and 20 deletions

View file

@ -955,7 +955,7 @@ func appendSubrouteToRouteList(routeList caddyhttp.RouteList,
func buildSubroute(routes []ConfigValue, groupCounter counter) (*caddyhttp.Subroute, error) {
for _, val := range routes {
if !directiveIsOrdered(val.directive) {
return nil, fmt.Errorf("directive '%s' is not ordered, so it cannot be used here", val.directive)
return nil, fmt.Errorf("directive '%s' is not an ordered HTTP handler, so it cannot be used here", val.directive)
}
}