~bigbes/core-go

9ad4643973379ffcc65c3f465d6add31c9f37569 — Conrad Hoffmann 7 months ago 3dc39b6
objects: make `URL()` respect `s3-insecure`

Helpful in development environments where a local S3 instance is used
without HTTPS.
1 files changed, 5 insertions(+), 1 deletions(-)

M objects/middleware.go
M objects/middleware.go => objects/middleware.go +5 -1
@@ 101,7 101,11 @@ func URL(conf ini.File) string {
	if upstream == "" {
		return ""
	}
	return "https://" + upstream
	scheme := "https://"
	if config.GetBool(conf, "objects", "s3-insecure", false) {
		scheme = "http://"
	}
	return scheme + upstream
}

func Enabled(conf ini.File) bool {