{
    frankenphp
    auto_https off
    admin off
}

:80 {
    root * /var/www/html/public

    encode zstd br gzip

    # Access logs are noise here: the proxy sidecar already records requests,
    # and errors still reach stderr through the default logger.
    log {
        output discard
    }

    # A file whose name carries Encore's hash (`layout.68eb71d6.js`, the release
    # build) can never be the wrong one: cached for good. One without — the
    # watcher's, in development — is asked again each time, or a reload keeps
    # the last week's script.
    @built path_regexp built ^/build/.+\.[0-9a-f]{8}\.[a-z0-9]+$
    header @built Cache-Control "public, max-age=31536000, immutable"

    @hidden {
        path /.*
        not path /.well-known/*
    }
    respond @hidden 404

    # Where installed packages add their directives (the Mercure hub of
    # wexample/symfony-live): inside the site, the only place Caddy reads them.
    # wex:install

    php_server
}
