diff options
author | Andy Lo-A-Foe <andy.loafoe@aemian.com> | 2016-01-19 19:41:39 +0100 |
---|---|---|
committer | Andy Lo-A-Foe <andy.loafoe@aemian.com> | 2016-01-19 19:41:39 +0100 |
commit | 6faabe34e8a56e247953be631a6af31a132b8b0b (patch) | |
tree | 4b1d56c22d06669f80b045eb8c7e1f9a7407ea3a /model/config.go | |
parent | c672820ff6a2a58d390c9bbc80fffdcc654e2716 (diff) | |
download | chat-6faabe34e8a56e247953be631a6af31a132b8b0b.tar.gz chat-6faabe34e8a56e247953be631a6af31a132b8b0b.tar.bz2 chat-6faabe34e8a56e247953be631a6af31a132b8b0b.zip |
Optionally specify ws:// and wss:// port in config
Diffstat (limited to 'model/config.go')
-rw-r--r-- | model/config.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go index ed56ed0c7..640eb49e5 100644 --- a/model/config.go +++ b/model/config.go @@ -40,6 +40,8 @@ type ServiceSettings struct { SessionLengthMobileInDays *int SessionLengthSSOInDays *int SessionCacheInMinutes *int + WebsocketSecurePort *int + WebsocketPort *int } type SSOSettings struct { @@ -330,6 +332,14 @@ func (o *Config) SetDefaults() { o.ServiceSettings.SessionCacheInMinutes = new(int) *o.ServiceSettings.SessionCacheInMinutes = 10 } + if o.ServiceSettings.WebsocketPort == nil { + o.ServiceSettings.WebsocketPort = new(int) + *o.ServiceSettings.WebsocketPort = 80 + } + if o.ServiceSettings.WebsocketSecurePort == nil { + o.ServiceSettings.WebsocketSecurePort = new(int) + *o.ServiceSettings.WebsocketSecurePort = 443 + } } func (o *Config) IsValid() *AppError { |