Fix public share URLs to use request host instead of hardcoded www.b0esche.cloud
This commit is contained in:
@@ -2943,7 +2943,7 @@ func publicFileShareHandler(w http.ResponseWriter, r *http.Request, db *database
|
|||||||
} else if r.TLS == nil {
|
} else if r.TLS == nil {
|
||||||
scheme = "http"
|
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))
|
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))
|
viewPath := fmt.Sprintf("%s://%s/public/share/%s/view?token=%s", scheme, host, token, url.QueryEscape(viewerToken))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user