1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-02-02 11:34:20 +02:00

Use path style in S3 transport (allows to use minio)

This commit is contained in:
DarthSim 2018-12-09 17:06:52 +06:00
parent 69505cb6d2
commit 313f2a96d4

View File

@ -18,11 +18,12 @@ func newS3Transport() http.RoundTripper {
s3Conf := aws.NewConfig()
if len(conf.S3Region) != 0 {
s3Conf.WithRegion(conf.S3Region)
s3Conf.Region = aws.String(conf.S3Region)
}
if len(conf.S3Endpoint) != 0 {
s3Conf.WithEndpoint(conf.S3Endpoint)
s3Conf.Endpoint = aws.String(conf.S3Endpoint)
s3Conf.S3ForcePathStyle = aws.Bool(true)
}
return s3Transport{s3.New(session.New(), s3Conf)}