summaryrefslogtreecommitdiff
path: root/internal/storage/storage.go
diff options
context:
space:
mode:
authorLibravatar Mara Sophie Grosch <littlefox@lf-net.org>2022-11-11 12:03:18 +0100
committerLibravatar GitHub <noreply@github.com>2022-11-11 12:03:18 +0100
commit948e90b95aa71a635fe5933e6e4a01823db6ac86 (patch)
treead4c575d9e09618d0deb01fb572e9342c659ad74 /internal/storage/storage.go
parent[chore] close in-storage media reader _before_ opening write, no need to leav... (diff)
downloadgotosocial-948e90b95aa71a635fe5933e6e4a01823db6ac86.tar.xz
[feature] S3: add config flag to proxy S3 media (#1014)
* S3: add config value "proxy" for not redirecting Signed-off-by: Mara Sophie Grosch <littlefox@lf-net.org> * S3: document new config value "proxy" * S3: add new config value "proxy" to test scripts Signed-off-by: Mara Sophie Grosch <littlefox@lf-net.org>
Diffstat (limited to 'internal/storage/storage.go')
-rw-r--r--internal/storage/storage.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/storage/storage.go b/internal/storage/storage.go
index e44c47184..303283f90 100644
--- a/internal/storage/storage.go
+++ b/internal/storage/storage.go
@@ -59,7 +59,11 @@ func AutoConfig() (Driver, error) {
if err != nil {
return nil, fmt.Errorf("creating minio client: %w", err)
}
- return NewS3(mc, config.GetStorageS3BucketName()), nil
+ return NewS3(
+ mc,
+ config.GetStorageS3BucketName(),
+ config.GetStorageS3Proxy(),
+ ), nil
case "local":
basePath := config.GetStorageLocalBasePath()
disk, err := storage.OpenDisk(basePath, &storage.DiskConfig{