summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorElias Nahum <nahumhbl@gmail.com>2016-03-01 14:17:29 -0300
committerElias Nahum <nahumhbl@gmail.com>2016-03-01 14:17:29 -0300
commit81f97ebc88be468f3cefecf8c850459d7eccc459 (patch)
treeb25020058b893fec416ba5949a5a4500ba7c6c10 /model
parentba6a38a7f6c497e025708111046d67875c4361be (diff)
downloadchat-81f97ebc88be468f3cefecf8c850459d7eccc459.tar.gz
chat-81f97ebc88be468f3cefecf8c850459d7eccc459.tar.bz2
chat-81f97ebc88be468f3cefecf8c850459d7eccc459.zip
Add default value to AllowCorsFrom setting
Diffstat (limited to 'model')
-rw-r--r--model/config.go7
1 files changed, 6 insertions, 1 deletions
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 {