summaryrefslogtreecommitdiffstats
path: root/modules/public/dynamic.go
diff options
context:
space:
mode:
authorMorgan Bazalgette <git@howl.moe>2018-02-03 23:37:05 +0100
committerLauris BH <lauris@nix.lv>2018-02-04 00:37:05 +0200
commit17655cdf1b409521262d5d54eb19884d307c47ce (patch)
treeb06d15367afc6bd4f915c0e8b9272241bb3f4a3c /modules/public/dynamic.go
parent77f8bad2fb7a6a4ab57b398cb89e6889f76ffe8a (diff)
downloadgitea-17655cdf1b409521262d5d54eb19884d307c47ce.tar.gz
gitea-17655cdf1b409521262d5d54eb19884d307c47ce.zip
Enable caching on assets and avatars (#3376)
* Enable caching on assets and avatars Fixes #3323 * Only set avatar in user BeforeUpdate when there is no avatar set * add error checking after stat * gofmt * Change cache time for avatars to an hour
Diffstat (limited to 'modules/public/dynamic.go')
-rw-r--r--modules/public/dynamic.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/modules/public/dynamic.go b/modules/public/dynamic.go
index c196d67baa..282db44970 100644
--- a/modules/public/dynamic.go
+++ b/modules/public/dynamic.go
@@ -12,10 +12,5 @@ import (
// Static implements the macaron static handler for serving assets.
func Static(opts *Options) macaron.Handler {
- return macaron.Static(
- opts.Directory,
- macaron.StaticOptions{
- SkipLogging: opts.SkipLogging,
- },
- )
+ return opts.staticHandler(opts.Directory)
}