mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-03 12:20:28 +08:00
优化代码
This commit is contained in:
@@ -41,6 +41,7 @@ func (this *UpgradeTemplateAction) RunPost(params struct {
|
||||
createGroupResp, err := this.RPC().HTTPFirewallRuleGroupRPC().CreateHTTPFirewallRuleGroup(this.AdminContext(), &pb.CreateHTTPFirewallRuleGroupRequest{
|
||||
IsOn: true,
|
||||
Name: group.Name,
|
||||
Code: group.Code,
|
||||
Description: group.Description,
|
||||
})
|
||||
if err != nil {
|
||||
@@ -60,8 +61,8 @@ func (this *UpgradeTemplateAction) RunPost(params struct {
|
||||
return
|
||||
}
|
||||
_, err = this.RPC().HTTPFirewallRuleGroupRPC().AddHTTPFirewallRuleGroupSet(this.AdminContext(), &pb.AddHTTPFirewallRuleGroupSetRequest{
|
||||
FirewallRuleGroupId: groupId,
|
||||
FirewallRuleSetsConfigJSON: setJSON,
|
||||
FirewallRuleGroupId: groupId,
|
||||
FirewallRuleSetConfigJSON: setJSON,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
@@ -83,8 +84,8 @@ func (this *UpgradeTemplateAction) RunPost(params struct {
|
||||
return
|
||||
}
|
||||
_, err = this.RPC().HTTPFirewallRuleGroupRPC().AddHTTPFirewallRuleGroupSet(this.AdminContext(), &pb.AddHTTPFirewallRuleGroupSetRequest{
|
||||
FirewallRuleGroupId: oldGroup.Id,
|
||||
FirewallRuleSetsConfigJSON: setJSON,
|
||||
FirewallRuleGroupId: oldGroup.Id,
|
||||
FirewallRuleSetConfigJSON: setJSON,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
|
||||
@@ -288,7 +288,7 @@ Vue.component("http-firewall-checkpoint-referer-block", {
|
||||
<td>允许的来源域名</td>
|
||||
<td>
|
||||
<values-box :values="allowDomains" @change="changeAllowDomains"></values-box>
|
||||
<p class="comment">允许的来源域名列表,比如<code-label>example.com</code-label>、<code-label>*.example.com</code-label>。</p>
|
||||
<p class="comment">允许的来源域名列表,比如<code-label>example.com</code-label>、<code-label>*.example.com</code-label>。单个星号<code-label>*</code-label>表示允许所有域名。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user