summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/map/caddyfile.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/caddyhttp/map/caddyfile.go')
-rw-r--r--modules/caddyhttp/map/caddyfile.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/caddyhttp/map/caddyfile.go b/modules/caddyhttp/map/caddyfile.go
index 8394b21..f1ee468 100644
--- a/modules/caddyhttp/map/caddyfile.go
+++ b/modules/caddyhttp/map/caddyfile.go
@@ -56,6 +56,11 @@ func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error)
if len(handler.Destinations) == 0 {
return nil, h.Err("missing destination argument(s)")
}
+ for _, dest := range handler.Destinations {
+ if shorthand := httpcaddyfile.WasReplacedPlaceholderShorthand(dest); shorthand != "" {
+ return nil, h.Errf("destination %s conflicts with a Caddyfile placeholder shorthand", shorthand)
+ }
+ }
// mappings
for h.NextBlock(0) {