添加iframe支持(conf enable_iframe)

This commit is contained in:
gsw945
2021-10-09 18:22:43 +08:00
parent 8515abcd9d
commit b624fea255
15 changed files with 240 additions and 16 deletions

View File

@@ -263,6 +263,12 @@ func RegisterFunction() {
logs.Error("注册函数 urlfor 出错 ->", err)
os.Exit(-1)
}
//读取配置值(未作任何转换)
err = web.AddFuncMap("conf", conf.CONF)
if err != nil {
logs.Error("注册函数 conf 出错 ->", err)
os.Exit(-1)
}
err = web.AddFuncMap("date_format", func(t time.Time, format string) string {
return t.Local().Format(format)
})