summaryrefslogtreecommitdiff
path: root/internal/config/config.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-07-07 16:17:39 +0200
committerLibravatar GitHub <noreply@github.com>2023-07-07 16:17:39 +0200
commit2a99df0588e168660d3b528209d8f51689ca92b7 (patch)
treea5835c3a0adf81ad4f07938919699fbc0de4a69b /internal/config/config.go
parent[bugfix] Reorder web view logic, other small fixes (#1954) (diff)
downloadgotosocial-2a99df0588e168660d3b528209d8f51689ca92b7.tar.xz
[feature] enable + document explicit IP dialer allowing/denying (#1950)v0.10.0-rc1
* [feature] enable + document explicit IP dialer allowing/denying * lord have mercy * allee jonge * shortcut check ipv6 prefixes * comment * separate httpclient_test, export Sanitizer
Diffstat (limited to 'internal/config/config.go')
-rw-r--r--internal/config/config.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index c809bbc1b..53514e20b 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -150,6 +150,9 @@ type Configuration struct {
AdvancedThrottlingRetryAfter time.Duration `name:"advanced-throttling-retry-after" usage:"Retry-After duration response to send for throttled requests."`
AdvancedSenderMultiplier int `name:"advanced-sender-multiplier" usage:"Multiplier to use per cpu for batching outgoing fedi messages. 0 or less turns batching off (not recommended)."`
+ // HTTPClient configuration vars.
+ HTTPClient HTTPClientConfiguration `name:"http-client"`
+
// Cache configuration vars.
Cache CacheConfiguration `name:"cache"`
@@ -163,6 +166,12 @@ type Configuration struct {
RequestIDHeader string `name:"request-id-header" usage:"Header to extract the Request ID from. Eg.,'X-Request-Id'."`
}
+type HTTPClientConfiguration struct {
+ AllowIPs []string `name:"allow-ips"`
+ BlockIPs []string `name:"block-ips"`
+ Timeout time.Duration `name:"timeout"`
+}
+
type CacheConfiguration struct {
GTS GTSCacheConfiguration `name:"gts"`