summaryrefslogtreecommitdiff
path: root/caddyconfig/caddyfile/parse.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2021-05-19 10:47:06 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2021-05-19 10:47:06 -0600
commitc052162203654d9fcb6f3a40b1c9b376b8e618d1 (patch)
treeed168c63505b98d378d2513b2a235742701d1db9 /caddyconfig/caddyfile/parse.go
parent7f26a6b3e507cef98c2d4a74384bacf53bc58f57 (diff)
parentb82db994f39c6991d673a7ae9836f5454b1f9668 (diff)
Merge branch '2.4'
Diffstat (limited to 'caddyconfig/caddyfile/parse.go')
-rwxr-xr-xcaddyconfig/caddyfile/parse.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/caddyconfig/caddyfile/parse.go b/caddyconfig/caddyfile/parse.go
index 96491bb..d870765 100755
--- a/caddyconfig/caddyfile/parse.go
+++ b/caddyconfig/caddyfile/parse.go
@@ -214,6 +214,11 @@ func (p *parser) addresses() error {
break
}
+ // Users commonly forget to place a space between the address and the '{'
+ if strings.HasSuffix(tkn, "{") {
+ return p.Errf("Site addresses cannot end with a curly brace: '%s' - put a space between the token and the brace", tkn)
+ }
+
if tkn != "" { // empty token possible if user typed ""
// Trailing comma indicates another address will follow, which
// may possibly be on the next line