@accelerated-software-development/caddy-api-client - v0.4.3
    Preparing search index...

    Function calculateRoutePriority

    • Calculate implicit priority from route match patterns Used when explicit priority is not set

      Priority is calculated based on:

      1. Path specificity (exact > prefix > wildcard)
      2. Host specificity (exact > wildcard)
      3. Number of matchers (more = more specific)

      Parameters

      Returns number

      Calculated priority (0-100, lower = higher priority)

      calculateRoutePriority({ match: [{ path: ["/health"] }] }) // Returns ~0 (health check)
      calculateRoutePriority({ match: [{ path: ["/api/*"] }] }) // Returns ~30 (specific path)
      calculateRoutePriority({ match: [{ path: ["/*"] }] }) // Returns ~90 (wildcard)