Add the secure access with HTTPS
Signed-off-by: Li Yi <denverdino@gmail.com>
This commit is contained in:
parent
bffce5722e
commit
46148721e1
1 changed files with 2 additions and 2 deletions
|
@ -125,7 +125,7 @@ func FromParameters(parameters map[string]interface{}) (*Driver, error) {
|
||||||
if ok {
|
if ok {
|
||||||
internalBool, ok = internal.(bool)
|
internalBool, ok = internal.(bool)
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, fmt.Errorf("The encrypt parameter should be a boolean")
|
return nil, fmt.Errorf("The internal parameter should be a boolean")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ func FromParameters(parameters map[string]interface{}) (*Driver, error) {
|
||||||
// bucketName
|
// bucketName
|
||||||
func New(params DriverParameters) (*Driver, error) {
|
func New(params DriverParameters) (*Driver, error) {
|
||||||
|
|
||||||
client := oss.NewOSSClient(params.Region, params.Internal, params.AccessKeyID, params.AccessKeySecret)
|
client := oss.NewOSSClient(params.Region, params.Internal, params.AccessKeyID, params.AccessKeySecret, params.Secure)
|
||||||
bucket := client.Bucket(params.Bucket)
|
bucket := client.Bucket(params.Bucket)
|
||||||
|
|
||||||
// Validate that the given credentials have at least read permissions in the
|
// Validate that the given credentials have at least read permissions in the
|
||||||
|
|
Loading…
Reference in a new issue