mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 13:10:26 +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 {
 | 
			
		||||
@@ -61,7 +62,7 @@ func (this *UpgradeTemplateAction) RunPost(params struct {
 | 
			
		||||
					}
 | 
			
		||||
					_, err = this.RPC().HTTPFirewallRuleGroupRPC().AddHTTPFirewallRuleGroupSet(this.AdminContext(), &pb.AddHTTPFirewallRuleGroupSetRequest{
 | 
			
		||||
						FirewallRuleGroupId:       groupId,
 | 
			
		||||
						FirewallRuleSetsConfigJSON: setJSON,
 | 
			
		||||
						FirewallRuleSetConfigJSON: setJSON,
 | 
			
		||||
					})
 | 
			
		||||
					if err != nil {
 | 
			
		||||
						this.ErrorPage(err)
 | 
			
		||||
@@ -84,7 +85,7 @@ func (this *UpgradeTemplateAction) RunPost(params struct {
 | 
			
		||||
					}
 | 
			
		||||
					_, err = this.RPC().HTTPFirewallRuleGroupRPC().AddHTTPFirewallRuleGroupSet(this.AdminContext(), &pb.AddHTTPFirewallRuleGroupSetRequest{
 | 
			
		||||
						FirewallRuleGroupId:       oldGroup.Id,
 | 
			
		||||
						FirewallRuleSetsConfigJSON: setJSON,
 | 
			
		||||
						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