diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-01-21 10:01:15 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-01-21 10:01:15 -0500 |
commit | c7faefbedcf540e938ab79e498ca86fabc967c5b (patch) | |
tree | 731262af8f8ff916a3e0d9260864804c0aaf84af /model | |
parent | 868eece9879131e9f2093a0e858533c9df76b55c (diff) | |
parent | ff8df5bf7d45ddd39df8b265ed6af07bd3932d55 (diff) | |
download | chat-c7faefbedcf540e938ab79e498ca86fabc967c5b.tar.gz chat-c7faefbedcf540e938ab79e498ca86fabc967c5b.tar.bz2 chat-c7faefbedcf540e938ab79e498ca86fabc967c5b.zip |
Merge pull request #1924 from loafoe/master
[#1923] Make Websocket ports configurable
Diffstat (limited to 'model')
-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 { |