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 -1
View File
@@ -36,7 +36,7 @@ func (ctx *ReqContext) Handle(cfg *setting.Cfg, status int, title string, err er
ctx.Data["AppSubUrl"] = cfg.AppSubURL
ctx.Data["Theme"] = "dark"
ctx.HTML(status, cfg.ErrTemplateName)
ctx.HTML(status, cfg.ErrTemplateName, ctx.Data)
}
func (ctx *ReqContext) IsApiRequest() bool {