mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-10-08 00:14:26 +08:00
添加iframe支持(conf enable_iframe
)
This commit is contained in:
@@ -8,6 +8,7 @@ sessionon = true
|
||||
sessionname = mindoc_id
|
||||
copyrequestbody = true
|
||||
enablexsrf = "${MINDOC_ENABLE_XSRF||false}"
|
||||
enable_iframe = "${MINDOC_ENABLE_IFRAME||false}"
|
||||
|
||||
#系统完整URL(http://doc.iminho.me),如果该项不设置,会从请求头中获取地址。
|
||||
baseurl="${MINDOC_BASE_URL}"
|
||||
|
@@ -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