Browse Source

Merge branch 'computing' of https://git.openi.org.cn/OpenI/aiforge into computing

tags/v1.22.1.3^2
zhoupzh 3 years ago
parent
commit
99d90ca09b
4 changed files with 4 additions and 10 deletions
  1. +1
    -5
      modules/context/context.go
  2. +1
    -3
      modules/setting/setting.go
  3. +1
    -1
      options/locale/locale_en-US.ini
  4. +1
    -1
      options/locale/locale_zh-CN.ini

+ 1
- 5
modules/context/context.go View File

@@ -328,11 +328,7 @@ func Contexter() macaron.Handler {
}
}

if setting.IFrameURL != "" {
ctx.Resp.Header().Set(`X-Frame-Options`, `ALLOW-FROM `+setting.IFrameURL)
} else {
ctx.Resp.Header().Set(`X-Frame-Options`, `SAMEORIGIN`)
}
//ctx.Resp.Header().Set(`X-Frame-Options`, `SAMEORIGIN`)

ctx.Data["CsrfToken"] = html.EscapeString(x.GetToken())
ctx.Data["CsrfTokenHtml"] = template.HTML(`<input type="hidden" name="_csrf" value="` + ctx.Data["CsrfToken"].(string) + `">`)


+ 1
- 3
modules/setting/setting.go View File

@@ -573,7 +573,6 @@ var (
OrgName string
TeamName string
}{}
IFrameURL string
)

// DateLang transforms standard language locale name to corresponding value in datetime plugin.
@@ -1341,8 +1340,7 @@ func NewContext() {
sec = Cfg.Section("course")
Course.OrgName = sec.Key("org_name").MustString("")
Course.TeamName = sec.Key("team_name").MustString("")
sec = Cfg.Section("xFrame")
IFrameURL = sec.Key("url").MustString("")

}

func SetRadarMapConfig() {


+ 1
- 1
options/locale/locale_en-US.ini View File

@@ -394,7 +394,7 @@ lang_select_error = Select a language from the list.

username_been_taken = The username is already taken.
repo_name_been_taken = The repository name or path is already used.
course_name_been_taken=The course path is already used.
course_name_been_taken=The course name or path is already used.
visit_rate_limit = Remote visit addressed rate limitation.
2fa_auth_required = Remote visit required two factors authentication.
org_name_been_taken = The organization name is already taken.


+ 1
- 1
options/locale/locale_zh-CN.ini View File

@@ -399,7 +399,7 @@ lang_select_error=从列表中选出语言

username_been_taken=用户名已被使用。
repo_name_been_taken=项目名称或项目路径已被使用。
course_name_been_taken=课程名称或路径已被使用。
course_name_been_taken=课程名称或地址已被使用。
visit_rate_limit=远程访问达到速度限制。
2fa_auth_required=远程访问需要双重验证。
org_name_been_taken=组织名称已被使用。


Loading…
Cancel
Save