mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 06:03:48 +03:00
caddyhttp: Honor wildcard hosts in log SkipHosts (#4606)
This commit is contained in:
parent
a72acd21b0
commit
2bb8550a4c
1 changed files with 2 additions and 1 deletions
|
@ -27,6 +27,7 @@ import (
|
|||
|
||||
"github.com/caddyserver/caddy/v2"
|
||||
"github.com/caddyserver/caddy/v2/modules/caddytls"
|
||||
"github.com/caddyserver/certmagic"
|
||||
"github.com/lucas-clemente/quic-go/http3"
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zapcore"
|
||||
|
@ -484,7 +485,7 @@ func (s *Server) shouldLogRequest(r *http.Request) bool {
|
|||
}
|
||||
for _, dh := range s.Logs.SkipHosts {
|
||||
// logging for this particular host is disabled
|
||||
if r.Host == dh {
|
||||
if certmagic.MatchWildcard(r.Host, dh) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue