WAF规则集中增加“允许搜索引擎”选项,可以快速允许搜索引擎访问

This commit is contained in:
GoEdgeLab
2024-05-08 16:42:40 +08:00
parent 60fb184d15
commit d321d0378c
4 changed files with 40 additions and 22 deletions

View File

@@ -82,6 +82,7 @@ func (this *CreateSetPopupAction) RunPost(params struct {
Connector string
ActionsJSON []byte
IgnoreLocal bool
IgnoreSearchEngine bool
// code
Code string
@@ -143,6 +144,7 @@ func (this *CreateSetPopupAction) RunPost(params struct {
Rules: rules,
Actions: actionConfigs,
IgnoreLocal: params.IgnoreLocal,
IgnoreSearchEngine: params.IgnoreSearchEngine,
}
setConfigJSON, err = json.Marshal(setConfig)

View File

@@ -98,6 +98,7 @@ func (this *UpdateSetPopupAction) RunPost(params struct {
Connector string
ActionsJSON []byte
IgnoreLocal bool
IgnoreSearchEngine bool
Must *actions.Must
}) {
@@ -149,6 +150,7 @@ func (this *UpdateSetPopupAction) RunPost(params struct {
setConfig.Rules = rules
setConfig.Actions = actionConfigs
setConfig.IgnoreLocal = params.IgnoreLocal
setConfig.IgnoreSearchEngine = params.IgnoreSearchEngine
setConfigJSON, err := json.Marshal(setConfig)
if err != nil {

View File

@@ -40,10 +40,17 @@
</td>
</tr>
<tr>
<td>忽略局域网IP</td>
<td>允许局域网IP</td>
<td>
<checkbox name="ignoreLocal"></checkbox>
<p class="comment">选中后表示如果请求来自局域网IP则直接跳过当前规则集。</p>
<p class="comment">选中后表示如果请求来自局域网IP则直接跳过当前规则集。</p>
</td>
</tr>
<tr>
<td>允许搜索引擎</td>
<td>
<checkbox name="ignoreSearchEngine"></checkbox>
<p class="comment">选中后表示如果请求来自常见搜索引擎的IP则直接跳过当前规则集。</p>
</td>
</tr>
</tbody>

View File

@@ -34,12 +34,19 @@
</td>
</tr>
<tr>
<td>忽略局域网IP</td>
<td>允许局域网IP</td>
<td>
<checkbox name="ignoreLocal" v-model="setConfig.ignoreLocal"></checkbox>
<p class="comment">选中后表示如果请求来自局域网IP则直接跳过当前规则集。</p>
</td>
</tr>
<tr>
<td>允许搜索引擎</td>
<td>
<checkbox name="ignoreSearchEngine" v-model="setConfig.ignoreSearchEngine"></checkbox>
<p class="comment">选中后表示如果请求来自常见搜索引擎的IP则直接跳过当前规则集。</p>
</td>
</tr>
</table>
<submit-btn></submit-btn>
</form>