Macaron: Strip down renderer middleware (#37627)

* strip down macaron renderer

* inline renderHTML

* remove IndentJSON parameter

* replace renderer with a html/template set

* fix failing test

* fix renderer paths in tests

* make template reloading even simpler

* unify ignored gzip path lookup

* fix csp middleware usage
This commit is contained in:
Serge Zaitsev
2021-08-10 13:29:46 +02:00
committed by GitHub
parent 5b575ae91f
commit 707d3536f0
14 changed files with 145 additions and 765 deletions
-1
View File
@@ -182,7 +182,6 @@ func (m *Macaron) createContext(rw http.ResponseWriter, req *http.Request) *Cont
index: 0,
Router: m.Router,
Resp: NewResponseWriter(req.Method, rw),
Render: &DummyRender{rw},
Data: make(map[string]interface{}),
}
req = req.WithContext(context.WithValue(req.Context(), macaronContextKey{}, c))