1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-06 17:41:00 +00:00

Proxify empty URL should not crash

This commit is contained in:
Frédéric Guillot 2022-07-05 21:13:40 -07:00
parent c0eab5ebc5
commit abe568b5b3
2 changed files with 27 additions and 1 deletions

View file

@ -14,5 +14,8 @@ import (
// ProxifyURL generates an URL for a proxified resource.
func ProxifyURL(router *mux.Router, link string) string {
return route.Path(router, "proxy", "encodedURL", base64.URLEncoding.EncodeToString([]byte(link)))
if link != "" {
return route.Path(router, "proxy", "encodedURL", base64.URLEncoding.EncodeToString([]byte(link)))
}
return ""
}