diff --git a/config/default.json b/config/default.json index 8bb76cd38f..41fe64a1f2 100644 --- a/config/default.json +++ b/config/default.json @@ -415,7 +415,7 @@ "PluginStates": {} }, "ImageProxySettings": { - "Enable": true, + "Enable": false, "ImageProxyType": "local", "RemoteImageProxyURL": "", "RemoteImageProxyOptions": "" diff --git a/model/config.go b/model/config.go index 231ca80006..3d316ffb22 100644 --- a/model/config.go +++ b/model/config.go @@ -2168,7 +2168,11 @@ type ImageProxySettings struct { func (ips *ImageProxySettings) SetDefaults(ss ServiceSettings) { if ips.Enable == nil { - ips.Enable = NewBool(true) + if ss.DEPRECATED_DO_NOT_USE_ImageProxyType == nil || *ss.DEPRECATED_DO_NOT_USE_ImageProxyType == "" { + ips.Enable = NewBool(false) + } else { + ips.Enable = NewBool(true) + } } if ips.ImageProxyType == nil { diff --git a/model/config_test.go b/model/config_test.go index 731e7070b8..6ed646c585 100644 --- a/model/config_test.go +++ b/model/config_test.go @@ -601,7 +601,7 @@ func TestImageProxySettingsSetDefaults(t *testing.T) { ips := ImageProxySettings{} ips.SetDefaults(ServiceSettings{}) - assert.Equal(t, true, *ips.Enable) + assert.Equal(t, false, *ips.Enable) assert.Equal(t, IMAGE_PROXY_TYPE_LOCAL, *ips.ImageProxyType) assert.Equal(t, "", *ips.RemoteImageProxyURL) assert.Equal(t, "", *ips.RemoteImageProxyOptions)