From 9221e099e442e411a39282f6de2ba1e7e3c78ebf Mon Sep 17 00:00:00 2001 From: Baltasar Blanco Date: Fri, 11 Sep 2026 17:02:05 -0300 Subject: [PATCH] docs(corefile): document that the Corefile is line oriented (#8544) The Caddyfile parser in coredns/caddy reads the arguments of a plugin, or of one of its properties, up to the end of the line, and a closing brace on that line can be read as one of them. corefile.5.md never said so, and a one-line server block such as '. { whoami }' fails with an error that reads like a brace-matching problem. Fixes #7267 Signed-off-by: Baltasar Blanco --- corefile.5.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/corefile.5.md b/corefile.5.md index 9cd8e92dd..85dad22b8 100644 --- a/corefile.5.md +++ b/corefile.5.md @@ -33,6 +33,15 @@ match on the query name will receive the query. server with no plugins will just return SERVFAIL for all queries. Each plugin can have a number of properties than can have arguments, see the documentation for each plugin. +The Corefile is line oriented: the arguments of a plugin, or of one of its properties, run until the +end of the line. Put each plugin, each property and each closing `}` on a line of its own. A `}` that +shares a line with a plugin or a property can be read as part of that line. For example, this fails +with "Unexpected '}' because no matching opening brace": + +~~~ txt +. { whoami } +~~~ + Comments are allowed and begin with an unquoted hash `#` and continue to the end of the line. Comments may be started anywhere on a line.