{
    # PHP 自动处理（FrankenPHP 内置）
    frankenphp
    order php_server before file_server
}

# 你的域名，改成实际的
:80 {
    root * /app
    php_server

    # 屏蔽敏感路径
    @blocked path /includes/* /data/* /Caddyfile /Dockerfile /docker-compose.yaml /README.md
    respond @blocked "Not Found" 404

    # 安全头
    header {
        X-Content-Type-Options "nosniff"
        X-Frame-Options "SAMEORIGIN"
        Referrer-Policy "strict-origin-when-cross-origin"
    }

    # 静态资源缓存
    @static path /static/* /uploads/*
    header @static Cache-Control "public, max-age=86400"

    log
}