From a8981a44c7a535558c204348b032df3114cadcc3 Mon Sep 17 00:00:00 2001 From: FireMasterK <20838718+FireMasterK@users.noreply.github.com> Date: Sat, 14 Nov 2020 01:06:08 +0530 Subject: [PATCH] Add support for /ytc/ - channel avatars. --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 888625b..25a524d 100644 --- a/main.go +++ b/main.go @@ -106,7 +106,7 @@ func getHost(path string) (host string) { host = "yt3.ggpht.com" } - if strings.HasPrefix(path, "/a/") { + if strings.HasPrefix(path, "/a/") || strings.HasPrefix(path, "/ytc/") { host = "yt3.ggpht.com" } @@ -134,6 +134,7 @@ func main() { http.HandleFunc("/vi/", genericHTTPProxy) http.HandleFunc("/vi_webp/", genericHTTPProxy) http.HandleFunc("/a/", genericHTTPProxy) + http.HandleFunc("/ytc/", genericHTTPProxy) http.HandleFunc("/ggpht/", genericHTTPProxy) http.HandleFunc("/sb/", genericHTTPProxy) socket := "socket" + string(os.PathSeparator) + "http-proxy.sock"