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 <baltasarblanco.dev@gmail.com>
This commit is contained in:
Baltasar Blanco
2026-09-11 17:02:05 -03:00
committed by GitHub
parent 19adcd8b96
commit 9221e099e4

View File

@@ -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 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. 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 are allowed and begin with an unquoted hash `#` and continue to the end of the line.
Comments may be started anywhere on a line. Comments may be started anywhere on a line.