7sg/ratelimiter

该软件包最新版本(v1.0)没有提供许可证信息。

提供对 Flow / Neos 应用程序进行速率限制的请求模式

v1.0 2021-09-22 09:45 UTC

This package is not auto-updated.

Last update: 2024-09-19 22:15:01 UTC


README

提供对 Flow / Neos 应用程序中特定路由进行速率限制的请求模式。

基于 gentle-force

安装

composer require '7sg/ratelimiter'

使用

Neos:
  Flow:
    security:
      firewall:
        filters:
          'Seven.Website:FooBar':
            pattern: 'Seven\RateLimiter\RateLimiterRequestPattern'
            patternOptions:
              uriPattern: '/protected-route'
              redisHostname: 'REDIS_HOST'
              redisPort: 6379
              useCaseKey: 'your-use-case-key'
              maxUsages: 5
              period: 60
            interceptor: 'AccessDeny'