Add default value to AllowCorsFrom setting

Этот коммит содержится в:
Elias Nahum
2016-03-01 14:17:29 -03:00
родитель ba6a38a7f6
Коммит 81f97ebc88
3 изменённых файлов: 9 добавлений и 4 удалений

Просмотреть файл

@@ -39,7 +39,7 @@ type ServiceSettings struct {
EnableDeveloper *bool
EnableSecurityFixAlert *bool
EnableInsecureOutgoingConnections *bool
AllowCorsFrom string
AllowCorsFrom *string
SessionLengthWebInDays *int
SessionLengthMobileInDays *int
SessionLengthSSOInDays *int
@@ -378,6 +378,11 @@ func (o *Config) SetDefaults() {
o.ServiceSettings.WebsocketSecurePort = new(int)
*o.ServiceSettings.WebsocketSecurePort = 443
}
if o.ServiceSettings.AllowCorsFrom == nil {
o.ServiceSettings.AllowCorsFrom = new(string)
*o.ServiceSettings.AllowCorsFrom = ""
}
}
func (o *Config) IsValid() *AppError {