• IP字段支持IP v4和v6值以及范围,如 “192.168.0.0/24”, “fe80::/10” 或 “192.168.0.0-192.168.0.255”
  • ip配置
    1. "127.0.0.1","::1/10","192.168.0.189","124.70.4.247","::ffff:124.70.4.247"

参考文档

  • 本机:”127.0.0.1”,”::ffff:127.0.0.1”
  • 局域网:”199.168.1.0/24”,”::ffff:192.168.1.28”
  • 服务器:”::ffff:124.70.4.247”,”::ffff:123.97.178.248”, “124.70.4.247”
  1. {
  2. "IpRateLimiting": {
  3. "EnableEndpointRateLimiting": true,
  4. "StackBlockedRequests": false,
  5. "RealIpHeader": "X-Real-IP",
  6. "ClientIdHeader": "X-ClientId",
  7. "IpWhitelist": [ "127.0.0.1","::ffff:127.0.0.1","199.168.1.0/24","::ffff:192.168.1.28", "::ffff:124.70.4.247","::ffff:123.97.178.248", "124.70.4.247" ], //白名单
  8. "EndpointWhitelist": [],
  9. "ClientWhitelist": [],
  10. "QuotaExceededResponse": {
  11. "Content": "{{\"status\":429,\"msg\":\"访问过于频繁,请稍后重试\",\"success\":false}}",
  12. "ContentType": "application/json",
  13. "StatusCode": 429
  14. },
  15. "HttpStatusCode": 429, //返回状态码
  16. "GeneralRules": [ //api规则,结尾一定要带*
  17. {
  18. "Endpoint": "*",
  19. "Period": "1m",
  20. "Limit": 0
  21. }
  22. ]
  23. }
  24. }