diff options
author | Harshavardhana <harsha@minio.io> | 2017-05-30 16:12:24 -0700 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2017-05-30 16:12:24 -0700 |
commit | f520aa1f4d18a65919c22240a4d0352022d6ca1b (patch) | |
tree | 558e3b39bbc0e8c7ee9dccb51ca912789786e080 /model/config.go | |
parent | d409c7c1c6a21de203c471134419726e1c7dcb12 (diff) | |
download | chat-f520aa1f4d18a65919c22240a4d0352022d6ca1b.tar.gz chat-f520aa1f4d18a65919c22240a4d0352022d6ca1b.tar.bz2 chat-f520aa1f4d18a65919c22240a4d0352022d6ca1b.zip |
Support AWS Signature V2 for Mattermost for S3 storage. (#6462)
Certain S3 compatible servers only use Legacy Signature (AWS
Signature V2), current code only supports signature v4.
This PR adds facility to click a button on the UI to enable
legacy signature with S3 compatible servers.
Diffstat (limited to 'model/config.go')
-rw-r--r-- | model/config.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go index 311a34610..b5ba7845f 100644 --- a/model/config.go +++ b/model/config.go @@ -238,6 +238,7 @@ type FileSettings struct { AmazonS3Region string AmazonS3Endpoint string AmazonS3SSL *bool + AmazonS3SignV2 *bool } type EmailSettings struct { @@ -502,6 +503,11 @@ func (o *Config) SetDefaults() { *o.FileSettings.AmazonS3SSL = true // Secure by default. } + if o.FileSettings.AmazonS3SignV2 == nil { + o.FileSettings.AmazonS3SignV2 = new(bool) + // Signature v2 is not enabled by default. + } + if o.FileSettings.EnableFileAttachments == nil { o.FileSettings.EnableFileAttachments = new(bool) *o.FileSettings.EnableFileAttachments = true |