@marcel91200 / caddy Mirror · read-only / commits / 2bb8550a
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 13, 21:45 UTC

caddyhttp: Honor wildcard hosts in log SkipHosts (#4606)

Matt Holt committed Mar 4, 2022 at 13:44 UTC 2bb8550a4cd59575ea7cc7c507550b9bd079894f
1 file changed +2 -1
modules/caddyhttp/server.go
+2 -1
@@ -27,6 +27,7 @@ import (
27
28 "github.com/caddyserver/caddy/v2"
29 "github.com/caddyserver/caddy/v2/modules/caddytls"
30 + "github.com/caddyserver/certmagic"
31 "github.com/lucas-clemente/quic-go/http3"
32 "go.uber.org/zap"
33 "go.uber.org/zap/zapcore"
@@ -484,7 +485,7 @@ func (s *Server) shouldLogRequest(r *http.Request) bool {
485 }
486 for _, dh := range s.Logs.SkipHosts {
487 // logging for this particular host is disabled
487 - if r.Host == dh {
488 + if certmagic.MatchWildcard(r.Host, dh) {
489 return false
490 }
491 }