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

chore(deps): bump github.com/go-chi/httprate from 0.12.1 to 0.14.1 #86

Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 2, 2024

Bumps github.com/go-chi/httprate from 0.12.1 to 0.14.1.

Release notes

Sourced from github.com/go-chi/httprate's releases.

v0.14.0

What's Changed

Add support to rate-limit by custom key from HTTP handler (e.g. by request payload fields)

// Rate-limiter for login endpoint.
loginRateLimiter := httprate.NewRateLimiter(5, time.Minute)
r.Post("/login", func(w http.ResponseWriter, r *http.Request) {
var payload struct {
Username string json:"username"
Password string json:"password"
}
err := json.NewDecoder(r.Body).Decode(&payload)
if err != nil || payload.Username == "" || payload.Password == "" {
w.WriteHeader(400)
return
}
// Rate-limit login at 5 req/min.
if loginRateLimiter.RespondOnLimit(w, r, payload.Username) {
	return
}
w.Write([]byte("login at 5 req/min\n"))

})

Full Changelog: go-chi/httprate@v0.12.1...v0.14.0

v0.13.1

What's Changed

Full Changelog: go-chi/httprate@v0.13.0...v0.13.1

v0.13.0

Full Changelog: go-chi/httprate@v0.13.0...v0.13.0

Add support to rate-limit by custom key from HTTP handler (e.g. by request payload fields)

// Rate-limiter for login endpoint.
loginRateLimiter := httprate.NewRateLimiter(5, time.Minute)
r.Post("/login", func(w http.ResponseWriter, r *http.Request) {
var payload struct {
</tr></table>

... (truncated)

Commits
  • ae11543 Add httpate.Key(string) helper for static keys (#45)
  • 5e681e3 Introduce RespondOnLimit() vs. OnLimit() (#44)
  • c4c778c Export RateLimiter type (#43)
  • 80029e2 Implement rate-limiting from HTTP handler (e.g. by request payload) (#42)
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot requested a review from a team as a code owner September 2, 2024 01:49
Copy link
Contributor Author

dependabot bot commented on behalf of github Sep 2, 2024

The following labels could not be found: dependencies.

@dependabot dependabot bot requested a review from piux2 September 2, 2024 01:49
@dependabot dependabot bot force-pushed the dependabot-go_modules-main-github.com-go-chi-httprate-0.14.1 branch 4 times, most recently from f1ec54c to 2cc6115 Compare September 16, 2024 13:33
Bumps [github.com/go-chi/httprate](https://github.com/go-chi/httprate) from 0.12.1 to 0.14.1.
- [Release notes](https://github.com/go-chi/httprate/releases)
- [Commits](go-chi/httprate@v0.12.1...v0.14.1)

---
updated-dependencies:
- dependency-name: github.com/go-chi/httprate
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot-go_modules-main-github.com-go-chi-httprate-0.14.1 branch from 2cc6115 to 248db0d Compare September 25, 2024 08:51
@ajnavarro ajnavarro merged commit 43ea527 into main Sep 26, 2024
4 checks passed
@ajnavarro ajnavarro deleted the dependabot-go_modules-main-github.com-go-chi-httprate-0.14.1 branch September 26, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant