diff options
author | 2021-07-26 16:15:36 +0200 | |
---|---|---|
committer | 2021-07-26 16:15:36 +0200 | |
commit | e2757ae6769758da766c7729f4b444a02414ecd0 (patch) | |
tree | 1754404193887503c64eefc4396065edd4d930e1 /internal/config/default.go | |
parent | Merge branch 'main' of github.com:superseriousbusiness/gotosocial into main (diff) | |
download | gotosocial-e2757ae6769758da766c7729f4b444a02414ecd0.tar.xz |
add trusted proxy for parsing client IPs (#115)
Diffstat (limited to 'internal/config/default.go')
-rw-r--r-- | internal/config/default.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/config/default.go b/internal/config/default.go index 1e26d6d4a..6fd9e3852 100644 --- a/internal/config/default.go +++ b/internal/config/default.go @@ -11,6 +11,7 @@ func TestDefault() *Config { Host: defaults.Host, Protocol: defaults.Protocol, Port: defaults.Port, + TrustedProxies: defaults.TrustedProxies, SoftwareVersion: defaults.SoftwareVersion, DBConfig: &DBConfig{ Type: defaults.DbType, @@ -77,6 +78,7 @@ func Default() *Config { Host: defaults.Host, Protocol: defaults.Protocol, Port: defaults.Port, + TrustedProxies: defaults.TrustedProxies, SoftwareVersion: defaults.SoftwareVersion, DBConfig: &DBConfig{ Type: defaults.DbType, @@ -145,6 +147,7 @@ func GetDefaults() Defaults { AccountDomain: "", Protocol: "https", Port: 8080, + TrustedProxies: []string{"127.0.0.1/32"}, // localhost DbType: "postgres", DbAddress: "localhost", @@ -204,6 +207,7 @@ func GetTestDefaults() Defaults { AccountDomain: "", Protocol: "http", Port: 8080, + TrustedProxies: []string{"127.0.0.1/32"}, DbType: "postgres", DbAddress: "localhost", |