diff options
Diffstat (limited to 'modules/caddyhttp/matchers.go')
-rw-r--r-- | modules/caddyhttp/matchers.go | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/modules/caddyhttp/matchers.go b/modules/caddyhttp/matchers.go index 731832b..7336a1b 100644 --- a/modules/caddyhttp/matchers.go +++ b/modules/caddyhttp/matchers.go @@ -68,17 +68,11 @@ func (m matchScript) Match(r *http.Request) bool { func (m matchProtocol) Match(r *http.Request) bool { switch string(m) { case "grpc": - if r.Header.Get("content-type") == "application/grpc" { - return true - } + return r.Header.Get("content-type") == "application/grpc" case "https": - if r.TLS != nil { - return true - } + return r.TLS != nil case "http": - if r.TLS == nil { - return true - } + return r.TLS == nil } return false |