mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 14:13:48 +03:00
51f125bd44
Some new users mistakenly try to define two sites without braces around each. Doing this can yield a confusing error message saying that their site address is an "unknown directive". We can do better by keeping track of whether the current site block was parsed with or without a brace, then changing the error message later based on that. For example, now this invalid config: ``` foo.example.com respond "foo" bar.example.com respond "bar" ``` Will yield this error message: ``` $ caddy adapt 2021/08/22 19:21:31.028 INFO using adjacent Caddyfile adapt: Caddyfile:4: unrecognized directive: bar.example.com Did you mean to define a second site? If so, you must use curly braces around each site to separate their configurations. ``` |
||
---|---|---|
.. | ||
addresses.go | ||
addresses_fuzz.go | ||
addresses_test.go | ||
builtins.go | ||
builtins_test.go | ||
directives.go | ||
directives_test.go | ||
httptype.go | ||
httptype_test.go | ||
options.go | ||
options_test.go | ||
pkiapp.go | ||
serveroptions.go | ||
tlsapp.go | ||
tlsapp_test.go |