Files
EdgeAdmin/web/views/@default/servers/server/settings/waf/ipadmin/providers.html
GoEdgeLab d7d0c8fbfe v1.4.1
2024-07-27 15:42:58 +08:00

59 lines
3.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{$layout}
{$template "../../settings_menu"}
{$template "/left_menu_with_menu"}
<div class="right-box with-menu">
{$template "../menu"}
<warning-message v-if="!featureIsOn">尚未为当前用户开通此功能。</warning-message>
{$ if .featureIsOn}
<warning-message v-if="!wafIsOn">当前WAF未启用设置将在<a :href="'/servers/server/settings/waf?serverId=' + serverId">[启用Web防火墙]</a>后生效。</warning-message>
<warning-message v-if="clusterFirewallPolicy != null && clusterFirewallPolicy.mode != 'defend'">当前网站所在集群的WAF策略模式为
<span v-if="clusterFirewallPolicy.modeInfo != null"><strong>{{clusterFirewallPolicy.modeInfo.name}}</strong></span>
<span v-else>非防御模式</span>,当前设置将不会生效。
</warning-message>
<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
<input type="hidden" name="firewallPolicyId" :value="firewallPolicyId"/>
<input type="hidden" name="exceptURLPatternsJSON" :value="JSON.stringify(exceptURLPatterns)"/>
<input type="hidden" name="onlyURLPatternsJSON" :value="JSON.stringify(onlyURLPatterns)"/>
<table class="ui table selectable definition">
<tr>
<td class="title">仅允许的运营商</td>
<td>
<http-firewall-provider-selector :v-providers="allowedProviders" :v-type="'allow'" @change="changeAllowedProviders"></http-firewall-provider-selector>
</td>
</tr>
<tr>
<td class="title">仅封禁的运营商</td>
<td>
<p class="comment" v-if="allowedProviders.length > 0">由于你已设置"仅允许的运营商",所以不需要再设置封禁运营商。</p>
<http-firewall-provider-selector :v-providers="deniedProviders" :v-type="'deny'" v-show="allowedProviders.length == 0"></http-firewall-provider-selector>
</td>
</tr>
<tr>
<td colspan="2"><more-options-indicator></more-options-indicator></td>
</tr>
<tbody v-show="moreOptionsVisible">
<tr>
<td>例外URL &nbsp;<tip-icon content="对这些URL将不做任何限制。"></tip-icon></td>
<td><url-patterns-box v-model="exceptURLPatterns"></url-patterns-box></td>
</tr>
<tr>
<td>限制URL &nbsp;<tip-icon content="只对这些URL做限制。"></tip-icon></td>
<td><url-patterns-box v-model="onlyURLPatterns"></url-patterns-box></td>
</tr>
<tr>
<td>提示内容</td>
<td>
<textarea v-model="providerHTML" name="providerHTML" rows="3"></textarea>
<p class="comment">当客户端所在运营商被封禁时提示页面的HTML内容不填则表示使用默认的提示内容支持请求变量。</p>
</td>
</tr>
</tbody>
</table>
<submit-btn></submit-btn>
</form>
{$end}
</div>