Fix public share URLs to use request host instead of hardcoded www.b0esche.cloud

This commit is contained in:
Leon Bösche
2026-01-25 03:33:28 +01:00
parent 5de1ab0b18
commit d3c174f623

View File

@@ -2943,7 +2943,7 @@ func publicFileShareHandler(w http.ResponseWriter, r *http.Request, db *database
} else if r.TLS == nil {
scheme = "http"
}
host := "www.b0esche.cloud"
host := r.Host
downloadPath := fmt.Sprintf("%s://%s/public/share/%s/download?token=%s", scheme, host, token, url.QueryEscape(viewerToken))
viewPath := fmt.Sprintf("%s://%s/public/share/%s/view?token=%s", scheme, host, token, url.QueryEscape(viewerToken))