hmol233
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
modules/caddyhttp/matchers.go
|
|
@ -667,7 +667,7 @@ func (MatchProtocol) CaddyModule() caddy.ModuleInfo { |
|
|
|
func (m MatchProtocol) Match(r *http.Request) bool { |
|
|
|
switch string(m) { |
|
|
|
case "grpc": |
|
|
|
return r.Header.Get("content-type") == "application/grpc" |
|
|
|
return strings.HasPrefix(r.Header.Get("content-type"), "application/grpc") |
|
|
|
case "https": |
|
|
|
return r.TLS != nil |
|
|
|
case "http": |
|
|
|