Log image proxy URL in debug mode

This commit is contained in:
Frédéric Guillot 2019-09-22 11:17:15 -07:00 committed by Frédéric Guillot
parent bdca3372f9
commit 3379429329
1 changed files with 5 additions and 1 deletions

View File

@ -16,6 +16,7 @@ import (
"miniflux.app/http/request"
"miniflux.app/http/response"
"miniflux.app/http/response/html"
"miniflux.app/logger"
)
func (h *handler) imageProxy(w http.ResponseWriter, r *http.Request) {
@ -37,7 +38,10 @@ func (h *handler) imageProxy(w http.ResponseWriter, r *http.Request) {
return
}
req, err := http.NewRequest("GET", string(decodedURL), nil)
imageURL := string(decodedURL)
logger.Debug(`[Proxy] Fetching %q`, imageURL)
req, err := http.NewRequest("GET", imageURL, nil)
if err != nil {
html.ServerError(w, r, err)
return