TuxInvader / nginx-dns

Sample Configuration for DNS over HTTPS (DoH/DoT gateway) and GSLB with NGINX
BSD 2-Clause "Simplified" License
194 stars 47 forks source link

Setting var dns_decode_level = 0 breaks DoH #4

Open bmenrigh opened 4 years ago

bmenrigh commented 4 years ago

The JS stack trace in the error logs is:

2020/08/13 22:11:07 [error] 20905#20905: *3 js exception: TypeError: cannot convert undefined argument to object
    at Object.entries (native)
    at JSON.stringify (native)
    at debug (dns.js:39)
    at anonymous (dns.js:183)
    at main (native)

I don't see a call to debug() at dns.js:183, instead that's just the start of a function. I can't follow which call to debug is causing the problem.

TuxInvader commented 4 years ago

Hi,

Can you try again with the lates commit please? https://github.com/TuxInvader/nginx-dns/commit/93a521aacc06aa4ac0210b5ec83240851db2e700

There was a debug which should only have been called if dns_decode_level was greater than 0.

Cheers