mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(apiserver): refactor the hooking mechanism for standalone apiserver (#93001)
It now uses a full build handler chain that can be passed from up top to `SetupConfig`. Co-authored-by: Charandas Batra <charandas.batra@grafana.com>
This commit is contained in:
committed by
GitHub
parent
a1a18922e5
commit
368c4e53f1
@@ -142,7 +142,7 @@ func mwFromHandler(handler Handler) Middleware {
|
||||
// a convenience function that is provided for users of contexthandler package (standalone apiservers)
|
||||
// who have an implicit dependency on Macron in context but don't want to take a dependency on
|
||||
// router additionally
|
||||
func EmptyMacronMiddleware(next http.Handler) http.Handler {
|
||||
func EmptyMacaronMiddleware(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) {
|
||||
m := New()
|
||||
c := m.createContext(writer, request)
|
||||
|
||||
Reference in New Issue
Block a user