summaryrefslogtreecommitdiff
path: root/internal/config/defaults.go
diff options
context:
space:
mode:
authorLibravatar kim <grufwub@gmail.com>2025-05-07 11:59:39 +0000
committerLibravatar kim <gruf@noreply.codeberg.org>2025-05-07 11:59:39 +0000
commit4c96e2571db177377e6346359ccec7cf1b8299cb (patch)
tree1f3a9259a4a9491b1efb392265c508295917e94a /internal/config/defaults.go
parent[bugfix] Fix indentation on multi-line alt text in web view (#4149) (diff)
downloadgotosocial-4c96e2571db177377e6346359ccec7cf1b8299cb.tar.xz
[feature] make nollamas difficulty configurable (#4119)
Makes the NoLLaMas proof-of-work scraper deterrence difficulty configurable. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4119 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal/config/defaults.go')
-rw-r--r--internal/config/defaults.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/internal/config/defaults.go b/internal/config/defaults.go
index 6e4d7e09a..100738253 100644
--- a/internal/config/defaults.go
+++ b/internal/config/defaults.go
@@ -131,11 +131,10 @@ var Defaults = Configuration{
SyslogAddress: "localhost:514",
Advanced: AdvancedConfig{
- SenderMultiplier: 2, // 2 senders per CPU
- CSPExtraURIs: []string{},
- HeaderFilterMode: RequestHeaderFilterModeDisabled,
- CookiesSamesite: "lax",
- ScraperDeterrence: false,
+ SenderMultiplier: 2, // 2 senders per CPU
+ CSPExtraURIs: []string{},
+ HeaderFilterMode: RequestHeaderFilterModeDisabled,
+ CookiesSamesite: "lax",
RateLimit: RateLimitConfig{
Requests: 300, // 1 per second per 5 minutes
@@ -146,6 +145,11 @@ var Defaults = Configuration{
Multiplier: 8, // 8 open requests per CPU
RetryAfter: 30 * time.Second,
},
+
+ ScraperDeterrence: ScraperDeterrenceConfig{
+ Enabled: false,
+ Difficulty: 4,
+ },
},
Cache: CacheConfiguration{