Closed cstockton closed 1 month ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
internal/api/phone.go | 1 | 2 | 50.0% | ||
internal/api/mail.go | 1 | 7 | 14.29% | ||
internal/conf/rate.go | 25 | 32 | 78.13% | ||
<!-- | Total: | 61 | 75 | 81.33% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
internal/api/phone.go | 1 | 81.51% | ||
internal/api/mail.go | 1 | 57.4% | ||
<!-- | Total: | 2 | --> |
Totals | |
---|---|
Change from base Build 11277025862: | 0.008% |
Covered Lines: | 9381 |
Relevant Lines: | 16180 |
Adds two new configuration values for rate limiting the sending of emails and sms messages:
It is implemented with a simple rate limiter that resets a counter at a regular interval. The first intervals start time is set when the counter is initialized. It will be reset when the server is restarted, but preserved when the config is reloaded.
Syntax examples:
Syntax in ABNF to express the format as value:
This change was a continuation of https://github.com/supabase/auth/pull/1746 adapted to support the recent preservation of rate limiters across server reloads.