From 9b19eeae8220c06bcf016e20b945b8a5fb1224e2 Mon Sep 17 00:00:00 2001 From: Catherine Date: Wed, 5 Nov 2025 22:40:48 +0000 Subject: [PATCH] Add missing `[limits]` keys to default configuration. --- conf/config.example.toml | 2 ++ src/config.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/conf/config.example.toml b/conf/config.example.toml index b7f4685..971eaca 100644 --- a/conf/config.example.toml +++ b/conf/config.example.toml @@ -44,6 +44,8 @@ git-large-object-threshold = "1M" max-symlink-depth = 16 update-timeout = "60s" max-heap-size-ratio = 0.5 # * RAM_size +forbidden-domains = [] +# allowed-repository-url-prefixes = [observability] slow-response-threshold = "500ms" diff --git a/src/config.go b/src/config.go index c44b3ee..e671efe 100644 --- a/src/config.go +++ b/src/config.go @@ -105,7 +105,7 @@ type LimitsConfig struct { // Soft limit on Go heap size, expressed as a fraction of total available RAM. MaxHeapSizeRatio float64 `toml:"max-heap-size-ratio" default:"0.5"` // List of domains unconditionally forbidden for uploads. - ForbiddenDomains []string `toml:"forbidden-domains"` + ForbiddenDomains []string `toml:"forbidden-domains" default:"[]"` // List of allowed repository URL prefixes. Setting this option prohibits uploading archives. AllowedRepositoryURLPrefixes []string `toml:"allowed-repository-url-prefixes"` }