mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2026-02-27 12:45:36 +08:00
服务支持自定义访客IP地址获取方式
This commit is contained in:
@@ -52,9 +52,7 @@ func (this *LocationHelper) BeforeAction(actionPtr actions.ActionWrapper) {
|
||||
}
|
||||
|
||||
func (this *LocationHelper) createMenus(serverIdString string, locationIdString string, secondMenuItem string, locationConfig *serverconfigs.HTTPLocationConfig) []maps.Map {
|
||||
menuItems := []maps.Map{
|
||||
|
||||
}
|
||||
menuItems := []maps.Map{}
|
||||
menuItems = append(menuItems, maps.Map{
|
||||
"name": "基本信息",
|
||||
"url": "/servers/server/settings/locations/location?serverId=" + serverIdString + "&locationId=" + locationIdString,
|
||||
@@ -163,6 +161,19 @@ func (this *LocationHelper) createMenus(serverIdString string, locationIdString
|
||||
"isOn": locationConfig != nil && locationConfig.Web != nil && locationConfig.Web.FastcgiRef != nil && locationConfig.Web.FastcgiRef.IsPrior,
|
||||
})
|
||||
|
||||
menuItems = append(menuItems, maps.Map{
|
||||
"name": "-",
|
||||
"url": "",
|
||||
"isActive": false,
|
||||
})
|
||||
|
||||
menuItems = append(menuItems, maps.Map{
|
||||
"name": "访客IP地址",
|
||||
"url": "/servers/server/settings/locations/remoteAddr?serverId=" + serverIdString + "&locationId=" + locationIdString,
|
||||
"isActive": secondMenuItem == "remoteAddr",
|
||||
"isOn": locationConfig != nil && locationConfig.Web != nil && locationConfig.Web.RemoteAddr != nil && locationConfig.Web.RemoteAddr.IsOn,
|
||||
})
|
||||
|
||||
return menuItems
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user