mirror of
https://github.com/gogs/gogs.git
synced 2025-05-25 17:00:55 +00:00
web: enable ETag
to improve loading speed of static resources (#7035)
Co-authored-by: shlande <shlandeme@icloud.com>
This commit is contained in:
parent
577621d463
commit
318fb25761
@ -89,6 +89,7 @@ func newMacaron() *macaron.Macaron {
|
||||
m.Use(macaron.Static(
|
||||
filepath.Join(conf.WorkDir(), "public"),
|
||||
macaron.StaticOptions{
|
||||
ETag: true,
|
||||
SkipLogging: conf.Server.DisableRouterLog,
|
||||
FileSystem: publicFs,
|
||||
},
|
||||
@ -97,6 +98,7 @@ func newMacaron() *macaron.Macaron {
|
||||
m.Use(macaron.Static(
|
||||
conf.Picture.AvatarUploadPath,
|
||||
macaron.StaticOptions{
|
||||
ETag: true,
|
||||
Prefix: db.USER_AVATAR_URL_PREFIX,
|
||||
SkipLogging: conf.Server.DisableRouterLog,
|
||||
},
|
||||
@ -104,6 +106,7 @@ func newMacaron() *macaron.Macaron {
|
||||
m.Use(macaron.Static(
|
||||
conf.Picture.RepositoryAvatarUploadPath,
|
||||
macaron.StaticOptions{
|
||||
ETag: true,
|
||||
Prefix: db.REPO_AVATAR_URL_PREFIX,
|
||||
SkipLogging: conf.Server.DisableRouterLog,
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user