| @@ -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["CsrfToken"] = html.EscapeString(x.GetToken()) | ||||
| ctx.Data["CsrfTokenHtml"] = template.HTML(`<input type="hidden" name="_csrf" value="` + ctx.Data["CsrfToken"].(string) + `">`) | ctx.Data["CsrfTokenHtml"] = template.HTML(`<input type="hidden" name="_csrf" value="` + ctx.Data["CsrfToken"].(string) + `">`) | ||||
| @@ -573,7 +573,6 @@ var ( | |||||
| OrgName string | OrgName string | ||||
| TeamName string | TeamName string | ||||
| }{} | }{} | ||||
| IFrameURL string | |||||
| ) | ) | ||||
| // DateLang transforms standard language locale name to corresponding value in datetime plugin. | // DateLang transforms standard language locale name to corresponding value in datetime plugin. | ||||
| @@ -1341,8 +1340,7 @@ func NewContext() { | |||||
| sec = Cfg.Section("course") | sec = Cfg.Section("course") | ||||
| Course.OrgName = sec.Key("org_name").MustString("") | Course.OrgName = sec.Key("org_name").MustString("") | ||||
| Course.TeamName = sec.Key("team_name").MustString("") | Course.TeamName = sec.Key("team_name").MustString("") | ||||
| sec = Cfg.Section("xFrame") | |||||
| IFrameURL = sec.Key("url").MustString("") | |||||
| } | } | ||||
| func SetRadarMapConfig() { | func SetRadarMapConfig() { | ||||
| @@ -394,7 +394,7 @@ lang_select_error = Select a language from the list. | |||||
| username_been_taken = The username is already taken. | username_been_taken = The username is already taken. | ||||
| repo_name_been_taken = The repository name or path is already used. | 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. | visit_rate_limit = Remote visit addressed rate limitation. | ||||
| 2fa_auth_required = Remote visit required two factors authentication. | 2fa_auth_required = Remote visit required two factors authentication. | ||||
| org_name_been_taken = The organization name is already taken. | org_name_been_taken = The organization name is already taken. | ||||
| @@ -399,7 +399,7 @@ lang_select_error=从列表中选出语言 | |||||
| username_been_taken=用户名已被使用。 | username_been_taken=用户名已被使用。 | ||||
| repo_name_been_taken=项目名称或项目路径已被使用。 | repo_name_been_taken=项目名称或项目路径已被使用。 | ||||
| course_name_been_taken=课程名称或路径已被使用。 | |||||
| course_name_been_taken=课程名称或地址已被使用。 | |||||
| visit_rate_limit=远程访问达到速度限制。 | visit_rate_limit=远程访问达到速度限制。 | ||||
| 2fa_auth_required=远程访问需要双重验证。 | 2fa_auth_required=远程访问需要双重验证。 | ||||
| org_name_been_taken=组织名称已被使用。 | org_name_been_taken=组织名称已被使用。 | ||||