Upgrade go-limiter to fix building on 1.17 (#12358)

* Upgrade go-limiter

* Modify quota system to pass contexts to upgraded go-limiter

* One more spot

* Add context vars to unit tests

* missed one
This commit is contained in:
Scott Miller
2021-09-01 16:28:47 -05:00
committed by GitHub
parent 566767a3c7
commit b368a67595
8 changed files with 30 additions and 23 deletions

View File

@@ -48,7 +48,7 @@ func rateLimitQuotaWrapping(handler http.Handler, core *vault.Core) http.Handler
return
}
quotaResp, err := core.ApplyRateLimitQuota(&quotas.Request{
quotaResp, err := core.ApplyRateLimitQuota(r.Context(), &quotas.Request{
Type: quotas.TypeRateLimit,
Path: path,
MountPath: strings.TrimPrefix(core.MatchingMount(r.Context(), path), ns.Path),