mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-03-04 10:24:40 +01:00
Improve error message when local DoH is enabled without a certificate
Fixes #1136
This commit is contained in:
parent
5c37d3b9de
commit
6fb42d0eae
1 changed files with 3 additions and 0 deletions
|
@ -61,6 +61,9 @@ func (handler localDoHHandler) ServeHTTP(writer http.ResponseWriter, request *ht
|
|||
|
||||
func (proxy *Proxy) localDoHListener(acceptPc *net.TCPListener) {
|
||||
defer acceptPc.Close()
|
||||
if len(proxy.localDoHCertFile) == 0 || len(proxy.localDoHCertKeyFile) == 0 {
|
||||
dlog.Fatal("A certificate and a key are required to start a local DoH service")
|
||||
}
|
||||
noh2 := make(map[string]func(*http.Server, *tls.Conn, http.Handler))
|
||||
httpServer := &http.Server{
|
||||
ReadTimeout: proxy.timeout,
|
||||
|
|
Loading…
Add table
Reference in a new issue