1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-26 18:21:01 +00:00

Proxify image enclosures

This commit is contained in:
Frédéric Guillot 2017-12-01 22:29:18 -08:00
parent 1a90c059e7
commit fb2a73c91e
9 changed files with 56 additions and 30 deletions

View file

@ -20,7 +20,7 @@ import (
// FindIcon try to find the website's icon.
func FindIcon(websiteURL string) (*model.Icon, error) {
rootURL := url.GetRootURL(websiteURL)
rootURL := url.RootURL(websiteURL)
client := http.NewClient(rootURL)
response, err := client.Get()
if err != nil {
@ -72,9 +72,9 @@ func parseDocument(websiteURL string, data io.Reader) (string, error) {
}
if iconURL == "" {
iconURL = url.GetRootURL(websiteURL) + "favicon.ico"
iconURL = url.RootURL(websiteURL) + "favicon.ico"
} else {
iconURL, _ = url.GetAbsoluteURL(websiteURL, iconURL)
iconURL, _ = url.AbsoluteURL(websiteURL, iconURL)
}
return iconURL, nil