MM-14560 Changed local image proxy to be off by default (#10444)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
dc94e660d1
Коммит
3bbec7e954
@@ -415,7 +415,7 @@
|
|||||||
"PluginStates": {}
|
"PluginStates": {}
|
||||||
},
|
},
|
||||||
"ImageProxySettings": {
|
"ImageProxySettings": {
|
||||||
"Enable": true,
|
"Enable": false,
|
||||||
"ImageProxyType": "local",
|
"ImageProxyType": "local",
|
||||||
"RemoteImageProxyURL": "",
|
"RemoteImageProxyURL": "",
|
||||||
"RemoteImageProxyOptions": ""
|
"RemoteImageProxyOptions": ""
|
||||||
|
|||||||
@@ -2168,7 +2168,11 @@ type ImageProxySettings struct {
|
|||||||
|
|
||||||
func (ips *ImageProxySettings) SetDefaults(ss ServiceSettings) {
|
func (ips *ImageProxySettings) SetDefaults(ss ServiceSettings) {
|
||||||
if ips.Enable == nil {
|
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 {
|
if ips.ImageProxyType == nil {
|
||||||
|
|||||||
@@ -601,7 +601,7 @@ func TestImageProxySettingsSetDefaults(t *testing.T) {
|
|||||||
ips := ImageProxySettings{}
|
ips := ImageProxySettings{}
|
||||||
ips.SetDefaults(ServiceSettings{})
|
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, IMAGE_PROXY_TYPE_LOCAL, *ips.ImageProxyType)
|
||||||
assert.Equal(t, "", *ips.RemoteImageProxyURL)
|
assert.Equal(t, "", *ips.RemoteImageProxyURL)
|
||||||
assert.Equal(t, "", *ips.RemoteImageProxyOptions)
|
assert.Equal(t, "", *ips.RemoteImageProxyOptions)
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user