Polymarket_rate_limiter.MatcherSourceRoute matching for rate limiting.
This module provides pattern matching for HTTP requests against route configurations. Pattern matching uses segment boundaries for paths, not simple prefix matching.
Check if a request matches a route pattern.
val find_matching_routes :
method_:string ->
uri:Uri.t ->
Types.route_config list ->
Types.route_config listFind all route configs that match the request. Routes are returned in the order they appear in the config list. All matching routes apply (not just first match).
Generate a unique key for state lookup. The key format is: "host:method:path_prefix"
Check if a path matches a prefix using segment boundaries. Examples:
"/orders" matches "/orders", "/orders/", "/orders/123""/orders" does NOT match "/orders-test", "/ordersX""/api/v1" matches "/api/v1/users""/api/v1" does NOT match "/api/v10"