Skip to content

Conversation

@francislavoie
Copy link
Member

Fixes https://caddy.community/t/caddy-site-access-log-empty/33237, an edgecase bug when a wildcard site block is used alongside a catch-all block of the same listener. We weren't checking logger names with wildcards in shouldLogRequest so it would fall through to the return !s.Logs.SkipUnmappedHosts case and prevent logging when it should have been logged.

Repro config:

http://*.localhost:8881 {
    log

    @foo host foo.localhost
    handle @foo {
        respond "foo"
    }

    handle {
        log_skip
        respond "Nope" 404
    }
}

:8881 {
    respond "catch-all"
}

curl -v foo.localhost:8881 should log, and curl -v bar.localhost:8881 should not log (because of log_skip). Before, neither logged.

Assistance Disclosure

None

@francislavoie francislavoie requested a review from mholt November 29, 2025 03:57
@francislavoie francislavoie added the bug 🐞 Something isn't working label Nov 29, 2025
@francislavoie francislavoie added this to the v2.11.0 milestone Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🐞 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants