summaryrefslogtreecommitdiffstats
path: root/modules/public/dynamic.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-11-13 20:51:07 +0800
committerGitHub <noreply@github.com>2020-11-13 14:51:07 +0200
commitc296f4fed66288431fa7ec3a64f990beccd29eb1 (patch)
tree6b2f1971303967671bd5da1d1149407e410d62bd /modules/public/dynamic.go
parent0ae35c66f2efe608e3176f796866c18461f0780f (diff)
downloadgitea-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/dynamic.go')
-rw-r--r--modules/public/dynamic.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/public/dynamic.go b/modules/public/dynamic.go
index 07f83e1f6a..f1a4dbb1a3 100644
--- a/modules/public/dynamic.go
+++ b/modules/public/dynamic.go
@@ -6,11 +6,9 @@
package public
-import (
- "gitea.com/macaron/macaron"
-)
+import "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 {
return opts.staticHandler(opts.Directory)
}