Merge dev into main for release v1.0.3
build / Go-Build (push) Successful in 1m28s
docker / docker (push) Successful in 4m32s

This commit is contained in:
2026-05-31 13:19:30 +02:00
+13 -4
View File
@@ -104,9 +104,18 @@ func getPublicUrl(r *http.Request, subpath string) string {
Host: r.Host,
Path: path.Join("public", subpath),
}
newURL.Scheme = "http"
if r.TLS != nil {
newURL.Scheme = "https"
}
newURL.Scheme = determineScheme(r)
return newURL.String()
}
func determineScheme(r *http.Request) string {
if proto := r.Header.Get("X-Forwarded-Proto"); proto != "" {
return proto
}
if r.TLS != nil {
return "https"
}
return "http"
}