# CoreDNS strict mode for agent-harness
# 許可ドメインのみDNS解決、それ以外はNXDOMAIN
# policy.tomlのdomains.allow.listと手動同期が必要。

# 許可ドメイン: api.anthropic.com → 外部DNSで解決
api.anthropic.com {
    forward . 8.8.8.8 8.8.4.4
    cache 60
    log
}

# それ以外: Dockerサービス名の静的解決 + デフォルトNXDOMAIN
. {
    hosts {
        172.30.0.2 proxy
        fallthrough
    }
    template ANY ANY {
        rcode NXDOMAIN
    }
    log
    errors
}
