diff --git a/src/RateLimitMiddleware.php b/src/RateLimitMiddleware.php index de2bc74..128fe3e 100644 --- a/src/RateLimitMiddleware.php +++ b/src/RateLimitMiddleware.php @@ -21,6 +21,7 @@ use function explode; use function filter_var; use function is_array; +use function str_replace; use function time; class RateLimitMiddleware implements MiddlewareInterface @@ -72,6 +73,8 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface if (empty($key)) { throw new MissingRequirement('Could not detect the client IP'); } + + $key = str_replace('.', '-', $key); } $data = $this->storage->get($key);