mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-22 13:05:36 +03:00
Pull request: dnsforward: don't redirect doh queries
Merge in DNS/adguard-home from 2628-no-redirect to master Updates #2628. Squashed commit of the following: commit 686f3254bed1c84fe79aa203c1da4db243f301e3 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Feb 2 13:51:16 2021 +0300 dnsforward: don't redirect doh queries
This commit is contained in:
parent
f5c47b6193
commit
28b9abf1dd
1 changed files with 8 additions and 0 deletions
|
@ -529,5 +529,13 @@ func (s *Server) registerHandlers() {
|
||||||
s.conf.HTTPRegister(http.MethodGet, "/control/access/list", s.handleAccessList)
|
s.conf.HTTPRegister(http.MethodGet, "/control/access/list", s.handleAccessList)
|
||||||
s.conf.HTTPRegister(http.MethodPost, "/control/access/set", s.handleAccessSet)
|
s.conf.HTTPRegister(http.MethodPost, "/control/access/set", s.handleAccessSet)
|
||||||
|
|
||||||
|
// Register both versions, with and without the trailing slash, to
|
||||||
|
// prevent a 301 Moved Permanently redirect when clients request the
|
||||||
|
// path without the trailing slash. Those redirects break some clients.
|
||||||
|
//
|
||||||
|
// See go doc net/http.ServeMux.
|
||||||
|
//
|
||||||
|
// See also https://github.com/AdguardTeam/AdGuardHome/issues/2628.
|
||||||
|
s.conf.HTTPRegister("", "/dns-query", s.handleDOH)
|
||||||
s.conf.HTTPRegister("", "/dns-query/", s.handleDOH)
|
s.conf.HTTPRegister("", "/dns-query/", s.handleDOH)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue