mirror of
https://github.com/coredns/coredns.io.git
synced 2024-04-21 12:32:00 +00:00
1.1 KiB
1.1 KiB
+++ title = "header" description = "header modifies the header for responses." weight = 23 tags = ["plugin", "header"] categories = ["plugin"] date = "2021-09-21T15:01:04.877489" +++
Description
header ensures that the flags are in the desired state for responses. The modifications are made transparently for the client.
Syntax
header {
ACTION FLAGS...
ACTION FLAGS...
}
- ACTION defines the state for DNS message header flags. Actions are evaluated in the order they are defined so last one has the
most precedence. Allowed values are:
setclear
- FLAGS are the DNS header flags that will be modified. Current supported flags include:
aa- Authoritative(Answer)ra- RecursionAvailablerd- RecursionDesired
Examples
Make sure recursive available ra flag is set in all the responses:
. {
header {
set ra
}
}
Make sure "recursion available" ra and "authoritative answer" aa flags are set and "recursion desired" is cleared in all responses:
. {
header {
set ra aa
clear rd
}
}