allowing

A policy allowing exactly these method to path-prefix pairs, for hosts widening ReadOnly deliberately.

val policy = LedgerApiPolicy.allowing(
*LedgerApiPolicy.ReadOnlyRules,
LedgerApiMethod.POST to "/v2/commands/async/submit",
)

Matching drops the query string and refuses any resource that is not already canonical — see canonicalLedgerApiPath for why a prefix cannot be escaped by traversal or percent-encoding.