mirror of
https://codeberg.org/gothub/gothub
synced 2024-12-06 19:16:24 +01:00
use avatar proxy instead of directly serving from GH
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user