diff options
Diffstat (limited to 'workhorse/config_test.go')
-rw-r--r-- | workhorse/config_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/workhorse/config_test.go b/workhorse/config_test.go index 36e43c23abd..658a352a333 100644 --- a/workhorse/config_test.go +++ b/workhorse/config_test.go @@ -30,6 +30,9 @@ func TestConfigFile(t *testing.T) { data := ` shutdown_timeout = "60s" +trusted_cidrs_for_x_forwarded_for = ["127.0.0.1/8", "192.168.0.1/8"] +trusted_cidrs_for_propagation = ["10.0.0.1/8"] + [redis] password = "redis password" [object_storage] @@ -51,6 +54,8 @@ max_scaler_procs = 123 require.Equal(t, "redis password", cfg.Redis.Password) require.Equal(t, "test provider", cfg.ObjectStorageCredentials.Provider) require.Equal(t, uint32(123), cfg.ImageResizerConfig.MaxScalerProcs, "image resizer max_scaler_procs") + require.Equal(t, []string{"127.0.0.1/8", "192.168.0.1/8"}, cfg.TrustedCIDRsForXForwardedFor) + require.Equal(t, []string{"10.0.0.1/8"}, cfg.TrustedCIDRsForPropagation) require.Equal(t, 60*time.Second, cfg.ShutdownTimeout.Duration) } |