mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 21:32:03 +08:00
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:
@ -217,10 +217,7 @@ func setupScenarioContext(t *testing.T, url string) *scenarioContext {
|
||||
require.Truef(t, exists, "Views should be in %q", viewsPath)
|
||||
|
||||
sc.m = macaron.New()
|
||||
sc.m.Use(macaron.Renderer(macaron.RenderOptions{
|
||||
Directory: viewsPath,
|
||||
Delims: macaron.Delims{Left: "[[", Right: "]]"},
|
||||
}))
|
||||
sc.m.UseMiddleware(macaron.Renderer(viewsPath, "[[", "]]"))
|
||||
sc.m.Use(getContextHandler(t, cfg).Middleware)
|
||||
|
||||
return sc
|
||||
|
Reference in New Issue
Block a user