Slightly more helpful error message

This commit is contained in:
Matthew Holt 2023-05-13 08:04:42 -06:00
parent a02ecb0f88
commit e96aafe1ca
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5

View file

@ -983,7 +983,7 @@ func buildSubroute(routes []ConfigValue, groupCounter counter, needsSorting bool
if needsSorting {
for _, val := range routes {
if !directiveIsOrdered(val.directive) {
return nil, fmt.Errorf("directive '%s' is not an ordered HTTP handler, 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 - try placing within a route block or using the order global option", val.directive)
}
}