Add s3pathstyle boolean to check for path v/s subdomain requests

This commit is contained in:
Harshavardhana
2015-02-24 14:13:28 -08:00
parent d5b6a07674
commit f3ed11a363
4 changed files with 27 additions and 16 deletions
+3
View File
@@ -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
View File
@@ -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
}