From bd4e5587c378e9eba7d58aa8c3fb76b79ae43d4a Mon Sep 17 00:00:00 2001 From: Matt Nordhoff Date: Sun, 7 Feb 2021 17:18:27 +0000 Subject: [PATCH] dnsdist docs: Fix formatting of response map example --- pdns/dnsdistdist/docs/guides/dns-over-https.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/dnsdistdist/docs/guides/dns-over-https.rst b/pdns/dnsdistdist/docs/guides/dns-over-https.rst index ab0c23fdac..a5cbac186b 100644 --- a/pdns/dnsdistdist/docs/guides/dns-over-https.rst +++ b/pdns/dnsdistdist/docs/guides/dns-over-https.rst @@ -29,7 +29,7 @@ A more complicated (and more realistic) example is when you want to indicate met addDOHLocal('2001:db8:1:f00::1', '/etc/ssl/certs/example.com.pem', '/etc/ssl/private/example.com.key', "/", {customResponseHeaders={["link"]=" rel=\\"service-meta\\"; type=\\"text/html\\""}}) It is also possible to set HTTP response rules to intercept HTTP queries early, before the DNS payload, if any, has been processed, to send custom responses including error pages, redirects or even serve static content. First a rule needs to be defined using :func:`newDOHResponseMapEntry`, then a set of rules can be applied to a DoH frontend via :meth:`DOHFrontend.setResponsesMap`. -For example, to send an HTTP redirect to queries asking for ``/rfc``, the following configuration can be used: +For example, to send an HTTP redirect to queries asking for ``/rfc``, the following configuration can be used:: map = { newDOHResponseMapEntry("^/rfc$", 307, "https://www.rfc-editor.org/info/rfc8484") } dohFE = getDOHFrontend(0) -- 2.47.2