mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-02-02 11:34:20 +02:00
Default S3 region
This commit is contained in:
parent
313f2a96d4
commit
b7f0713308
@ -26,7 +26,13 @@ func newS3Transport() http.RoundTripper {
|
||||
s3Conf.S3ForcePathStyle = aws.Bool(true)
|
||||
}
|
||||
|
||||
return s3Transport{s3.New(session.New(), s3Conf)}
|
||||
sess := session.New()
|
||||
|
||||
if sess.Config.Region == nil || len(*sess.Config.Region) == 0 {
|
||||
sess.Config.Region = aws.String("us-west-1")
|
||||
}
|
||||
|
||||
return s3Transport{s3.New(sess, s3Conf)}
|
||||
}
|
||||
|
||||
func (t s3Transport) RoundTrip(req *http.Request) (resp *http.Response, err error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user