From 4319d9d835470e5e1dfd19be5e96465c21397def Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Fri, 10 Feb 2023 16:01:57 +0530 Subject: [PATCH] use avatar proxy instead of directly serving from GH --- pages/user.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pages/user.go b/pages/user.go index df1a884..8ee296e 100644 --- a/pages/user.go +++ b/pages/user.go @@ -172,6 +172,8 @@ func HandleUser(c *fiber.Ctx) error { log.Println("Bio and Location routes cannot be scraped for organizations") } sc.Visit("https://github.com/" + c.Params("user") + "/") + Scrape.AvatarUrl = strings.TrimPrefix(Scrape.AvatarUrl, "https://avatars.githubusercontent.com/u/") + Scrape.AvatarUrl = "/avatar/" + Scrape.AvatarUrl userArray = append(userArray, Scrape) return c.Render("user", fiber.Map{