From f44d64b7adb9f659a9bd9afcd9abfb8d9fc5774e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20B=C3=B6sche?= Date: Sun, 25 Jan 2026 00:27:58 +0100 Subject: [PATCH] Fix share URL host to always use www.b0esche.cloud instead of r.Host --- go_cloud/internal/http/routes.go | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/go_cloud/internal/http/routes.go b/go_cloud/internal/http/routes.go index 7ac603e..4f71f5a 100644 --- a/go_cloud/internal/http/routes.go +++ b/go_cloud/internal/http/routes.go @@ -2764,10 +2764,7 @@ func getFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db *databas } else if r.TLS == nil { scheme = "http" } - host := r.Host - if host == "" { - host = "www.b0esche.cloud" - } + host := "www.b0esche.cloud" fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token) w.Header().Set("Content-Type", "application/json") @@ -2832,10 +2829,7 @@ func createFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db *data } else if r.TLS == nil { scheme = "http" } - host := r.Host - if host == "" { - host = "www.b0esche.cloud" - } + host := "www.b0esche.cloud" fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token) w.Header().Set("Content-Type", "application/json") @@ -3101,10 +3095,7 @@ func getUserFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db *dat } else if r.TLS == nil { scheme = "http" } - host := r.Host - if host == "" { - host = "www.b0esche.cloud" - } + host := "www.b0esche.cloud" fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token) w.Header().Set("Content-Type", "application/json") @@ -3166,10 +3157,7 @@ func createUserFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db * } else if r.TLS == nil { scheme = "http" } - host := r.Host - if host == "" { - host = "www.b0esche.cloud" - } + host := "www.b0esche.cloud" fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token) w.Header().Set("Content-Type", "application/json")