summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2016-02-05 12:40:32 -0500
committerJoramWilander <jwawilander@gmail.com>2016-02-05 12:40:32 -0500
commit9f5f18a93a6db2b9c1089862fb68c2ee33e634ca (patch)
tree67f66a9bcfda2ad1d87ae238b47f8be6531522b2 /model
parent8c505e7b5cb8138e53b71ed7e0465665654a596b (diff)
downloadchat-9f5f18a93a6db2b9c1089862fb68c2ee33e634ca.tar.gz
chat-9f5f18a93a6db2b9c1089862fb68c2ee33e634ca.tar.bz2
chat-9f5f18a93a6db2b9c1089862fb68c2ee33e634ca.zip
Make insecure TLS connections configurable
Diffstat (limited to 'model')
-rw-r--r--model/config.go48
1 files changed, 27 insertions, 21 deletions
diff --git a/model/config.go b/model/config.go
index acb525abf..aa3dd3586 100644
--- a/model/config.go
+++ b/model/config.go
@@ -24,26 +24,27 @@ const (
)
type ServiceSettings struct {
- ListenAddress string
- MaximumLoginAttempts int
- SegmentDeveloperKey string
- GoogleDeveloperKey string
- EnableOAuthServiceProvider bool
- EnableIncomingWebhooks bool
- EnableOutgoingWebhooks bool
- EnableCommands *bool
- EnableOnlyAdminIntegrations *bool
- EnablePostUsernameOverride bool
- EnablePostIconOverride bool
- EnableTesting bool
- EnableDeveloper *bool
- EnableSecurityFixAlert *bool
- SessionLengthWebInDays *int
- SessionLengthMobileInDays *int
- SessionLengthSSOInDays *int
- SessionCacheInMinutes *int
- WebsocketSecurePort *int
- WebsocketPort *int
+ ListenAddress string
+ MaximumLoginAttempts int
+ SegmentDeveloperKey string
+ GoogleDeveloperKey string
+ EnableOAuthServiceProvider bool
+ EnableIncomingWebhooks bool
+ EnableOutgoingWebhooks bool
+ EnableCommands *bool
+ EnableOnlyAdminIntegrations *bool
+ EnablePostUsernameOverride bool
+ EnablePostIconOverride bool
+ EnableTesting bool
+ EnableDeveloper *bool
+ EnableSecurityFixAlert *bool
+ EnableInsecureOutgoingConnections *bool
+ SessionLengthWebInDays *int
+ SessionLengthMobileInDays *int
+ SessionLengthSSOInDays *int
+ SessionCacheInMinutes *int
+ WebsocketSecurePort *int
+ WebsocketPort *int
}
type SSOSettings struct {
@@ -164,7 +165,7 @@ type LdapSettings struct {
UsernameAttribute *string
IdAttribute *string
- // Advansed
+ // Advanced
QueryTimeout *int
}
@@ -252,6 +253,11 @@ func (o *Config) SetDefaults() {
*o.ServiceSettings.EnableSecurityFixAlert = true
}
+ if o.ServiceSettings.EnableInsecureOutgoingConnections == nil {
+ o.ServiceSettings.EnableInsecureOutgoingConnections = new(bool)
+ *o.ServiceSettings.EnableInsecureOutgoingConnections = false
+ }
+
if o.TeamSettings.RestrictTeamNames == nil {
o.TeamSettings.RestrictTeamNames = new(bool)
*o.TeamSettings.RestrictTeamNames = true