On 16.09.19 16:17, Stephane Bortzmeyer wrote:
> On Mon, Sep 16, 2019 at 03:02:28PM +0200,
>  Daniel Stirnimann <daniel.stirnim...@switch.ch> wrote 
>  a message of 13 lines which said:
> 
>> The feature is only available in 1.4.0-rc2. Is this version string correct?
> 
> With 1.4.0-rc2, the configuration is accepted but seems ignored. I have:
> 
> addDOHLocal("0.0.0.0:443", "/etc/dnsdist/server.pem", 
> "/etc/dnsdist/server.key")
> addDOHLocal("[::]:443", "/etc/dnsdist/server.pem", "/etc/dnsdist/server.key")
> 
> supportpagemap = { newDOHResponseMapEntry("about", 200, "A documentation will 
> appear one day") }
> dohFE = getDOHFrontend(0)
> dohFE:setResponsesMap(supportpagemap)
> 
> And a request for /about yields 400 "Unable to parse the request".

If your request went over IPv6 then this is expected because you added
the supportpagemap only on your IPv4 listener. Make sure you also add:

dohFEv6 = getDOHFrontend(1)
dohFEv6:setResponsesMap(supportpagemap)

Note also, the newDOHResponseMapEntry first argument is a regex. You may
want to make it more specific, e.g. "^/about$

Daniel

_______________________________________________
dnsdist mailing list
dnsdist@mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/dnsdist

Reply via email to