Skip to content

Commit

Permalink
Add support for disabling https in s3proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
zhulik committed Jul 5, 2024
1 parent 2516770 commit 61c85d0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions s3proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func main() {
bucket := getEnv("BUCKET")
endpoint := getEnv("ENDPOINT")
forcePathStype := getEnv("FORCE_PATH_STYLE") != ""
disableHTTPS := getEnv("DISABLE_HTTPS", "0") != "0"

cfg := lo.Must(config.LoadDefaultConfig(context.Background()))

Expand All @@ -71,6 +72,7 @@ func main() {
Bucket: bucket,
S3Client: s3.NewFromConfig(cfg, func(o *s3.Options) {
o.UsePathStyle = forcePathStype
o.EndpointOptions.DisableHTTPS = disableHTTPS
}),
}
http.HandleFunc("/*", proxy.Handle)
Expand Down

0 comments on commit 61c85d0

Please sign in to comment.