Skip to content

Commit

Permalink
cmd/sync: sync custom endpoint env without mount point (#3922)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhijian-pro committed Jul 21, 2023
1 parent 634d85c commit 3e13de0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"net/http"
_ "net/http/pprof"
"net/url"
"os"
"path/filepath"
"regexp"
"runtime"
Expand Down Expand Up @@ -315,6 +316,9 @@ func createSyncStorage(uri string, conf *sync.Config) (object.ObjectStorage, err
if err != nil {
return nil, fmt.Errorf("unescape %s: %s", u.Host, err)
}
if os.Getenv(endpoint) != "" {
conf.Env[endpoint] = os.Getenv(endpoint)
}
} else if !conf.NoHTTPS && supportHTTPS(name, u.Host) {
endpoint = "https://" + u.Host
} else {
Expand Down

0 comments on commit 3e13de0

Please sign in to comment.