From 81f97ebc88be468f3cefecf8c850459d7eccc459 Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Tue, 1 Mar 2016 14:17:29 -0300 Subject: Add default value to AllowCorsFrom setting --- model/config.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'model') diff --git a/model/config.go b/model/config.go index a7d92c101..82c51224e 100644 --- a/model/config.go +++ b/model/config.go @@ -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 { -- cgit v1.2.3-1-g7c22