summaryrefslogtreecommitdiff
path: root/internal/config/flags.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-01-04 11:57:59 +0100
committerLibravatar GitHub <noreply@github.com>2023-01-04 11:57:59 +0100
commit90a14abb0c693287d10c5b2b8a6e5515f3ed4c37 (patch)
treeb6cac62664d5bb0eed762e4bb9b8dab33c0da516 /internal/config/flags.go
parent[docs] Fix documentation edit link (#1298) (diff)
downloadgotosocial-90a14abb0c693287d10c5b2b8a6e5515f3ed4c37.tar.xz
[feature] HTTP request throttling middleware (#1297)
* [feature] Add throttling middleware to AP endpoints * refactor a lil bit * use config setting, start updating docs * doc updates * use relative links in faq doc * small docs fixes * return code 503 instead of 429 when throttled * throttle other endpoints too * simplify token channel prefills
Diffstat (limited to 'internal/config/flags.go')
-rw-r--r--internal/config/flags.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/config/flags.go b/internal/config/flags.go
index c5df1c8b2..3a5d69f25 100644
--- a/internal/config/flags.go
+++ b/internal/config/flags.go
@@ -132,6 +132,7 @@ func (s *ConfigState) AddServerFlags(cmd *cobra.Command) {
// Advanced flags
cmd.Flags().String(AdvancedCookiesSamesiteFlag(), cfg.AdvancedCookiesSamesite, fieldtag("AdvancedCookiesSamesite", "usage"))
cmd.Flags().Int(AdvancedRateLimitRequestsFlag(), cfg.AdvancedRateLimitRequests, fieldtag("AdvancedRateLimitRequests", "usage"))
+ cmd.Flags().Int(AdvancedThrottlingMultiplierFlag(), cfg.AdvancedThrottlingMultiplier, fieldtag("AdvancedThrottlingMultiplier", "usage"))
})
}