diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-11-13 20:51:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-13 14:51:07 +0200 |
commit | c296f4fed66288431fa7ec3a64f990beccd29eb1 (patch) | |
tree | 6b2f1971303967671bd5da1d1149407e410d62bd /modules/public/static.go | |
parent | 0ae35c66f2efe608e3176f796866c18461f0780f (diff) | |
download | gitea-c296f4fed66288431fa7ec3a64f990beccd29eb1.tar.gz gitea-c296f4fed66288431fa7ec3a64f990beccd29eb1.zip |
Introduce go chi web framework as frontend of macaron, so that we can move routes from macaron to chi step by step (#7420)
* When route cannot be found on chi, go to macaron
* Stick chi version to 1.5.0
* Follow router log setting
Diffstat (limited to 'modules/public/static.go')
-rw-r--r-- | modules/public/static.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/public/static.go b/modules/public/static.go index 76050632c9..8da10567ea 100644 --- a/modules/public/static.go +++ b/modules/public/static.go @@ -8,12 +8,11 @@ package public import ( "io/ioutil" - - "gitea.com/macaron/macaron" + "net/http" ) // Static implements the macaron static handler for serving assets. -func Static(opts *Options) macaron.Handler { +func Static(opts *Options) func(next http.Handler) http.Handler { opts.FileSystem = Assets // we don't need to pass the directory, because the directory var is only // used when in the options there is no FileSystem. |