mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 12:52:27 -05:00
[feature] enable + document explicit IP dialer allowing/denying (#1950)
* [feature] enable + document explicit IP dialer allowing/denying * lord have mercy * allee jonge * shortcut check ipv6 prefixes * comment * separate httpclient_test, export Sanitizer
This commit is contained in:
parent
ac564c1862
commit
2a99df0588
17 changed files with 554 additions and 200 deletions
|
|
@ -105,8 +105,12 @@ var Start action.GTSAction = func(ctx context.Context) error {
|
|||
// Set the state storage driver
|
||||
state.Storage = storage
|
||||
|
||||
// Build HTTP client (TODO: add configurables here)
|
||||
client := httpclient.New(httpclient.Config{})
|
||||
// Build HTTP client
|
||||
client := httpclient.New(httpclient.Config{
|
||||
AllowRanges: config.MustParseIPPrefixes(config.GetHTTPClientAllowIPs()),
|
||||
BlockRanges: config.MustParseIPPrefixes(config.GetHTTPClientBlockIPs()),
|
||||
Timeout: config.GetHTTPClientTimeout(),
|
||||
})
|
||||
|
||||
// Initialize workers.
|
||||
state.Workers.Start()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue