From 3727981e75f2b40d0a745e76899ee4c813fbaa7b Mon Sep 17 00:00:00 2001 From: Mickael Kerjean Date: Thu, 26 Jan 2023 01:18:05 +1100 Subject: [PATCH] fix (s3): cloudflare s3 default --- server/plugin/plg_backend_s3/index.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/plugin/plg_backend_s3/index.go b/server/plugin/plg_backend_s3/index.go index 04460a7c..92c62f4b 100644 --- a/server/plugin/plg_backend_s3/index.go +++ b/server/plugin/plg_backend_s3/index.go @@ -41,6 +41,9 @@ func (s S3Backend) Init(params map[string]string, app *App) (IBackend, error) { if params["region"] == "" { params["region"] = "us-east-2" + if strings.HasSuffix(params["endpoint"], ".cloudflarestorage.com") { + params["region"] = "auto" + } } creds := []credentials.Provider{} if params["access_key_id"] != "" || params["secret_access_key"] != "" {