Skip to content

Create an app ThrottleRequests middleware #3796

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

Closed
wants to merge 1 commit into from
Closed

Create an app ThrottleRequests middleware #3796

wants to merge 1 commit into from

Conversation

lucasmichot
Copy link
Contributor

The purpose of this PR is to allow a quicker extension of \Illuminate\Routing\Middleware\ThrottleRequests

The original middleware is good for most standard cases but does not bring some useful features.

  • skip hit on an internal request
  • skip hit on 304 not-modified responses
  • change header names
  • define a max attempt value, per user or group of user

Use cases can be so numerous that it would not make sense to put all of them in the original middleware.
Instead this PR allows the user to quickly override \Illuminate\Routing\Middleware\ThrottleRequests

It tends to mimic what has been done for \App\Exceptions\Handler::report

@GrahamCampbell
Copy link
Member

I don't think it's necessary to include this in the default app.

@lucasmichot
Copy link
Contributor Author

I didn't feel too that it was necessary before, but it turns out that this is the only middleware that I have to override on each projects

@hadifarnoud
Copy link

I think this is very much needed to be in default app.

@lucasmichot lucasmichot closed this Jun 2, 2016
@lucasmichot lucasmichot deleted the feature/develop/throttlerequests-easier-override branch June 2, 2016 20:57
@lucasmichot lucasmichot restored the feature/develop/throttlerequests-easier-override branch June 7, 2016 06:59
@lucasmichot lucasmichot deleted the feature/develop/throttlerequests-easier-override branch August 29, 2016 18:00
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.

3 participants