From: Matt Nordhoff Date: Sun, 7 Feb 2021 17:18:27 +0000 (+0000) Subject: dnsdist docs: Fix formatting of response map example X-Git-Tag: dnsdist-1.6.0-alpha2~56^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bd4e5587c378e9eba7d58aa8c3fb76b79ae43d4a;p=thirdparty%2Fpdns.git dnsdist docs: Fix formatting of response map example --- 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)