Skip to content

Commit 40c0f6f

Browse files
committed
Use existing key in fallback
1 parent 7dcd17c commit 40c0f6f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Illuminate/Cache/RateLimiting/Limit.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ public function response(callable $callback)
150150
*/
151151
public function fallbackKey()
152152
{
153-
return "attempts:{$this->maxAttempts}:decay:{$this->decaySeconds}";
153+
$prefix = $this->key === '' ? '' : "{$this->key}:";
154+
155+
return "{$prefix}attempts:{$this->maxAttempts}:decay:{$this->decaySeconds}";
154156
}
155157
}

0 commit comments

Comments
 (0)