1
0
Fork 0

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

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