From f520aa1f4d18a65919c22240a4d0352022d6ca1b Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 30 May 2017 16:12:24 -0700 Subject: 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. --- model/config.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'model') 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 -- cgit v1.2.3-1-g7c22