mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-10-24 18:25:01 +08:00
添加iframe支持(conf enable_iframe)
This commit is contained in:
@@ -152,6 +152,11 @@ func GetEnableExport() bool {
|
||||
return web.AppConfig.DefaultBool("enable_export", true)
|
||||
}
|
||||
|
||||
//是否启用iframe
|
||||
func GetEnableIframe() bool {
|
||||
return web.AppConfig.DefaultBool("enable_iframe", false)
|
||||
}
|
||||
|
||||
//同一项目导出线程的并发数
|
||||
func GetExportProcessNum() int {
|
||||
exportProcessNum := web.AppConfig.DefaultInt("export_process_num", 1)
|
||||
@@ -208,6 +213,15 @@ func IsAllowUploadFileExt(ext string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
//读取配置文件值
|
||||
func CONF(key string, value ...string) string {
|
||||
defaultValue := ""
|
||||
if len(value) > 0 {
|
||||
defaultValue = value[0]
|
||||
}
|
||||
return web.AppConfig.DefaultString(key, defaultValue)
|
||||
}
|
||||
|
||||
//重写生成URL的方法,加上完整的域名
|
||||
func URLFor(endpoint string, values ...interface{}) string {
|
||||
baseUrl := web.AppConfig.DefaultString("baseurl", "")
|
||||
|
||||
Reference in New Issue
Block a user