Fix share URL host to always use www.b0esche.cloud instead of r.Host

This commit is contained in:
Leon Bösche
2026-01-25 00:27:58 +01:00
parent 7ed915555b
commit f44d64b7ad

View File

@@ -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")