fix: ignore profile picture cache after profile picture gets updated

This commit is contained in:
Elias Schneider
2025-04-09 15:51:58 +02:00
parent 658a9ca6dd
commit 4ba68938dd
5 changed files with 62 additions and 7 deletions

View File

@@ -254,7 +254,10 @@ func (uc *UserController) getUserProfilePictureHandler(c *gin.Context) {
defer picture.Close()
}
c.Header("Cache-Control", "public, max-age=300")
_, ok := c.GetQuery("skipCache")
if !ok {
c.Header("Cache-Control", "public, max-age=900")
}
c.DataFromReader(http.StatusOK, size, "image/png", picture, nil)
}