From 49e3e100cddc3bdb73937fc62f2846976772d03a Mon Sep 17 00:00:00 2001 From: FireMasterK <20838718+FireMasterK@users.noreply.github.com> Date: Sun, 20 Jun 2021 12:38:57 +0530 Subject: [PATCH] Fix path not being rewritten for maxres.jpg. --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index f5f9ba2..addc3bd 100644 --- a/main.go +++ b/main.go @@ -77,7 +77,7 @@ func (*requesthandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { proxyURL.RawQuery = q.Encode() if strings.HasSuffix(proxyURL.EscapedPath(), "maxres.jpg") { - proxyURL.RawPath = getBestThumbnail(proxyURL.EscapedPath()) + proxyURL.Path = getBestThumbnail(proxyURL.EscapedPath()) } request, err := http.NewRequest("GET", proxyURL.String(), nil)