print debug

This commit is contained in:
Andrea Spacca 2021-11-22 08:38:10 +01:00
parent 01ac42bc11
commit 387734027c

View file

@ -115,6 +115,7 @@ func (*requesthandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
} }
path := req.URL.EscapedPath() path := req.URL.EscapedPath()
fmt.Println(path)
path = strings.Replace(path, path_prefix, "", 1) path = strings.Replace(path, path_prefix, "", 1)
@ -128,6 +129,7 @@ func (*requesthandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
} }
proxyURL.RawQuery = q.Encode() proxyURL.RawQuery = q.Encode()
fmt.Println(q.Encode())
if strings.HasSuffix(proxyURL.EscapedPath(), "maxres.jpg") { if strings.HasSuffix(proxyURL.EscapedPath(), "maxres.jpg") {
proxyURL.Path = getBestThumbnail(proxyURL.EscapedPath()) proxyURL.Path = getBestThumbnail(proxyURL.EscapedPath())