coredns.io icon indicating copy to clipboard operation
coredns.io copied to clipboard

Add flatten external plugin

Open litobro opened this issue 10 months ago • 0 comments

Adding a new external plugin that implements a form of CNAME flattening that is compatible with apex records.

It is notably different from rewrite as it only changes the response for A and AAAA records. Allowing other records such as SOA, MX, TXT etc. to be served as intended.

Implemented by checking the request NAME as a match for the parameter and that the QType is A or AAAA. Then resolves to the selected DNS Server, creates a reply and overwrites the rr header to provide the original requested NAME for RFC compliance. All other requests fall through to the next plugin.

litobro avatar Apr 18 '24 04:04 litobro