mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-12 11:20:27 +08:00
安全设置中增加禁止搜索引擎、禁止爬虫、允许访问的域名等选项
This commit is contained in:
@@ -75,6 +75,13 @@ func (this *userMustAuth) BeforeAction(actionPtr actions.ActionWrapper, paramNam
|
||||
return false
|
||||
}
|
||||
|
||||
// 检查请求
|
||||
if !checkRequestSecurity(securityConfig, action.Request) {
|
||||
action.ResponseWriter.WriteHeader(http.StatusForbidden)
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
// 检查系统是否已经配置过
|
||||
if !setup.IsConfigured() {
|
||||
action.RedirectURL("/setup")
|
||||
|
||||
Reference in New Issue
Block a user