KH can select mount policy through wildcard patterns. This reduces repeated XML but makes precedence part of the access and operational model. A broad rule can affect a stream you did not have in mind when writing it.

Define precedence intentionally

The pinned documentation describes exact mounts before patterns, followed by pattern priority. Lower numeric priority values take precedence; unspecified priorities fall into the lowest-priority category. For equal-priority pattern matches the documented compatibility behaviour selects the last matching entry. Avoid relying on ties when the policy matters.

This is an excerpt directly inside <icecast>. The different listener limits make a disposable precedence test observable:

xml · Code example
<mount>
  <mount-name>/*</mount-name><priority>100</priority>
  <max-listeners>5</max-listeners>
</mount>
<mount>
  <mount-name>/*.mp3</mount-name><priority>10</priority>
  <max-listeners>10</max-listeners>
</mount>
<mount>
  <mount-name>/live.mp3</mount-name>
  <max-listeners>15</max-listeners>
</mount>

The expected selection is the exact block for /live.mp3, the MP3 pattern for /news.mp3, and the broad pattern for /talk.ogg. The numbers are test markers, not capacity recommendations. Do not include these three blocks in an existing configuration without checking other exact and pattern definitions.

Do not assume a merge

Selection of a policy is not a promise that all matching blocks merge their settings. Put the intended authentication, publication and relevant limits in the selected policy. Keep a narrowly scoped exception explicit and check whether file requests or relay-related paths are affected. /admin operations have special handling and cannot simply be modelled as ordinary public mounts.

Test more than the happy path

List representative existing names, a new name, a near-match and an unintended format. For each, write the expected block and observable policy before reloading. Reconnect test sources or clients as needed, inspect effective statistics and admission results, and review logs. This is especially important when XML is generated and element order changes. A parser accepting a wildcard says nothing about whether it matched the name you intended.