Add s3pathstyle boolean to check for path v/s subdomain requests
This commit is contained in:
@@ -46,6 +46,9 @@ type Auth struct {
|
||||
// Used for SSL transport layer
|
||||
CertPEM string
|
||||
KeyPEM string
|
||||
|
||||
// Force path style
|
||||
S3ForcePathStyle bool
|
||||
}
|
||||
|
||||
type TlsConfig struct {
|
||||
|
||||
+5
-4
@@ -373,11 +373,12 @@ func (c *Client) Delete(bucket, key string) error {
|
||||
}
|
||||
*/
|
||||
|
||||
func NewAuth(accessKey, secretKey, hostname string) (auth *Auth) {
|
||||
func NewAuth(accessKey, secretKey, hostname string, style bool) (auth *Auth) {
|
||||
auth = &Auth{
|
||||
AccessKey: accessKey,
|
||||
SecretAccessKey: secretKey,
|
||||
Endpoint: hostname,
|
||||
AccessKey: accessKey,
|
||||
SecretAccessKey: secretKey,
|
||||
Endpoint: hostname,
|
||||
S3ForcePathStyle: style,
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user