mirror of
https://github.com/coredns/coredns.git
synced 2025-11-11 22:42:21 -05:00
custom DoH request validation (#4329)
* custom DoH request validation Signed-off-by: Johnny Bergström <johnny@klaudify.se> * add comment and test Signed-off-by: Johnny Bergström <johnny@klaudify.se> * NewServerHTTPS comment typo Signed-off-by: Johnny Bergström <johnny@klaudify.se>
This commit is contained in:
@@ -3,6 +3,7 @@ package dnsserver
|
||||
import (
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/coredns/caddy"
|
||||
"github.com/coredns/coredns/plugin"
|
||||
@@ -31,6 +32,11 @@ type Config struct {
|
||||
// DNS-over-TLS or DNS-over-gRPC.
|
||||
Transport string
|
||||
|
||||
// If this function is not nil it will be used to inspect and validate
|
||||
// HTTP requests. Although this isn't referenced in-tree, external plugins
|
||||
// may depend on it.
|
||||
HTTPRequestValidateFunc func(*http.Request) bool
|
||||
|
||||
// If this function is not nil it will be used to further filter access
|
||||
// to this handler. The primary use is to limit access to a reverse zone
|
||||
// on a non-octet boundary, i.e. /17
|
||||
|
||||
Reference in New Issue
Block a user