Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update built asset caching (#5601)

authored by

Eric Bailey and committed by
GitHub
54ca8165 48241cb2

+2 -8
+2 -8
bskyweb/cmd/bskyweb/server.go
··· 204 204 path := c.Request().URL.Path 205 205 maxAge := 1 * (60 * 60) // default is 1 hour 206 206 207 - // Cache javascript and images files for 1 week, which works because 208 - // they're always versioned (e.g. /static/js/main.64c14927.js) 209 - if strings.HasPrefix(path, "/static/js/") || strings.HasPrefix(path, "/static/images/") || strings.HasPrefix(path, "/static/media/") { 210 - maxAge = 7 * (60 * 60 * 24) // 1 week 211 - } 212 - 213 - // fonts can be cached for a year 214 - if strings.HasSuffix(path, ".otf") { 207 + // all assets in /static/js, /static/css, /static/media are content-hashed and can be cached for a long time 208 + if strings.HasPrefix(path, "/static/js/") || strings.HasPrefix(path, "/static/css/") || strings.HasPrefix(path, "/static/media/") { 215 209 maxAge = 365 * (60 * 60 * 24) // 1 year 216 210 } 217 211