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

Feat/create ratelimit for api #28 #29

Merged
merged 6 commits into from
Dec 10, 2024
Merged

Conversation

tanhongit
Copy link
Member

Summary

  • Update config file
  • Create route provider service to handle rate limit for APIs

Unit Testing

Operation check

Caution

Release Notes

Note

Additional Notes

Checklist

  • Code follows our Coding Standards.
  • Code matches the confirmed solution in the ticket.
  • Unit/Integration tests have been added or updated.
  • Env/Config/DB changes were confirmed by @cslant/admin.

@tanhongit tanhongit added the feature request Want to create a new feature, improvement, or change in the existing system or project label Dec 10, 2024
@tanhongit tanhongit added this to the Installation milestone Dec 10, 2024
@tanhongit tanhongit self-assigned this Dec 10, 2024
@tanhongit tanhongit linked an issue Dec 10, 2024 that may be closed by this pull request
@tanhongit tanhongit requested a review from a team December 10, 2024 15:45
$user = $request->user();
$identifier = $user ? $user->id : $request->ip();

return Limit::perMinute(40)->by($identifier);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set rate limit for the API path in urls

@tanhongit tanhongit merged commit 5bb564f into main Dec 10, 2024
@tanhongit tanhongit deleted the feat/Create-ratelimit-for-API-#28 branch December 10, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Want to create a new feature, improvement, or change in the existing system or project
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Create ratelimit for API
1 participant