Skip to content

Commit 5d6f935

Browse files
committed
Print something useful when browsing the local DoH URL
1 parent 3ef9ec8 commit 5d6f935

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

dnscrypt-proxy/local-doh.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ func (handler localDoHHandler) ServeHTTP(writer http.ResponseWriter, request *ht
1818
dataType := "application/dns-message"
1919
writer.Header().Set("Server", "dnscrypt-proxy")
2020
if request.Header.Get("Content-Type") != dataType {
21+
writer.Header().Set("Content-Type", "text/plain")
2122
writer.WriteHeader(400)
22-
writer.Write([]byte("Unexpected Content-Type\n"))
23+
writer.Write([]byte("dnscrypt-proxy local DoH server\n"))
2324
return
2425
}
2526
proxy := handler.proxy

0 commit comments

Comments
 (0)