hash user's ip for key generation #12
Closed
ItsANameToo
started this conversation in
Ideas
Replies: 2 comments 3 replies
-
Surely a hash will be calculated differently every time, hence the key will change and the rate limit wont work? Have you tested it? |
Beta Was this translation helpful? Give feedback.
0 replies
-
when using
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Could the user's IP address that's being used to generate a key be adjusted to make use of a hash instead? The line in question is https://github.com/danharrin/livewire-rate-limiting/blob/main/src/WithRateLimiting.php#L23
Having it as a hash of the IP instead would bring it in line with the way Laravel generates a key for throttling (see https://github.com/laravel/framework/blob/9.x/src/Illuminate/Routing/Middleware/ThrottleRequests.php#L172) and will also avoid using user-identifiable data when not necessary.
Beta Was this translation helpful? Give feedback.
All reactions