Skip to content

Commit c907752

Browse files
committed
Rework function to use https by default
1 parent 3ae25d9 commit c907752

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

upload/uploader.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,17 @@ func (u Uploader) Upload() error {
9494
}
9595

9696
func (u Uploader) TransformPostBatchURL(rawUrl string) string {
97-
if !u.Insecure {
98-
return rawUrl
99-
}
100-
10197
parsed, err := url.Parse(rawUrl)
10298

10399
if err != nil {
104100
return rawUrl
105101
}
106102

107-
parsed.Scheme = "http"
103+
if (u.Insecure) {
104+
parsed.Scheme = "http"
105+
} else {
106+
parsed.Scheme = "https"
107+
}
108108

109109
return parsed.String()
110110
}

0 commit comments

Comments
 (0)