Refactor URL generation in file sharing handlers to remove hash fragment

This commit is contained in:
Leon Bösche
2026-01-25 18:50:02 +01:00
parent 904e909ce1
commit 3fb556c8f1
3 changed files with 4 additions and 12 deletions

View File

@@ -2795,7 +2795,7 @@ func getFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db *databas
scheme = "http"
}
host := "www.b0esche.cloud"
fullURL := fmt.Sprintf("%s://%s/#/share/%s", scheme, host, link.Token)
fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token)
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(map[string]interface{}{
@@ -2860,7 +2860,7 @@ func createFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db *data
scheme = "http"
}
host := "www.b0esche.cloud"
fullURL := fmt.Sprintf("%s://%s/#/share/%s", scheme, host, link.Token)
fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token)
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(map[string]interface{}{
@@ -3303,7 +3303,7 @@ func getUserFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db *dat
scheme = "http"
}
host := "www.b0esche.cloud"
fullURL := fmt.Sprintf("%s://%s/#/share/%s", scheme, host, link.Token)
fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token)
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(map[string]interface{}{
@@ -3365,7 +3365,7 @@ func createUserFileShareLinkHandler(w http.ResponseWriter, r *http.Request, db *
scheme = "http"
}
host := "www.b0esche.cloud"
fullURL := fmt.Sprintf("%s://%s/#/share/%s", scheme, host, link.Token)
fullURL := fmt.Sprintf("%s://%s/share/%s", scheme, host, link.Token)
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(map[string]interface{}{