Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key class customizable #20

Merged
merged 7 commits into from
Oct 27, 2023
Merged

Key class customizable #20

merged 7 commits into from
Oct 27, 2023

Conversation

l3aro
Copy link
Contributor

@l3aro l3aro commented Sep 9, 2023

Currently, the package use static::class along with function name and request ip to create rate limit key

return sha1(static::class.'|'.$method.'|'.request()->ip());

But the new Volt has the syntax define an anonymous class that extends Livewire\Volt\Component. This will make the static::class return different value each request. For example:

resources/views/pages/register.blade.php:9$2a6
resources/views/pages/register.blade.php:9$28

So, I make a small update that add ability to customize class name, just like method name

@l3aro
Copy link
Contributor Author

l3aro commented Sep 18, 2023

@danharrin Could you please take a look around this? Any comments are appreciated

@l3aro
Copy link
Contributor Author

l3aro commented Sep 25, 2023

no activity

@l3aro l3aro closed this Sep 25, 2023
@danharrin danharrin reopened this Oct 27, 2023
@danharrin danharrin merged commit 027a44c into danharrin:main Oct 27, 2023
2 of 5 checks passed
@danharrin
Copy link
Owner

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants