The given code snippet represents an array of rules for endpoint rate limiting. Each rule defines the properties of an endpoint for rate limiting purposes. Let's break down the properties of the rule:

  • "Endpoint": "/api/Device/GetDevicePlayList" - Specifies the endpoint URL that is being rate-limited.
  • "Period": "1m" - Specifies the time period for which the rate limit is applied. In this case, it is set to 1 minute.
  • "Limit": 10 - Specifies the maximum number of requests allowed within the defined period.
  • "CounterKeyBuilder": "Path" - Specifies the key builder type used for counting the requests. In this case, it is based on the path of the endpoint.
  • "Priority": 3 - Specifies the priority of the rule. Lower numbers indicate higher priority.

This configuration ensures that the endpoint "/api/Device/GetDevicePlayList" is rate-limited to a maximum of 10 requests per minute, with a priority of 3

EndpointRules Endpoint apiDeviceGetDevicePlayList Period 1m Limit 10 CounterKeyBuilder Path Priority 3

原文地址: https://www.cveoy.top/t/topic/ikPi 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录