mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-16 05:30:27 +08:00
WAF规则集中增加是否忽略局域网IP选项
This commit is contained in:
@@ -73,6 +73,7 @@ func (this *CreateSetPopupAction) RunPost(params struct {
|
|||||||
RulesJSON []byte
|
RulesJSON []byte
|
||||||
Connector string
|
Connector string
|
||||||
ActionsJSON []byte
|
ActionsJSON []byte
|
||||||
|
IgnoreLocal bool
|
||||||
|
|
||||||
Must *actions.Must
|
Must *actions.Must
|
||||||
}) {
|
}) {
|
||||||
@@ -124,6 +125,7 @@ func (this *CreateSetPopupAction) RunPost(params struct {
|
|||||||
RuleRefs: nil,
|
RuleRefs: nil,
|
||||||
Rules: rules,
|
Rules: rules,
|
||||||
Actions: actionConfigs,
|
Actions: actionConfigs,
|
||||||
|
IgnoreLocal: params.IgnoreLocal,
|
||||||
}
|
}
|
||||||
|
|
||||||
setConfigJSON, err := json.Marshal(setConfig)
|
setConfigJSON, err := json.Marshal(setConfig)
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ func (this *UpdateSetPopupAction) RunPost(params struct {
|
|||||||
RulesJSON []byte
|
RulesJSON []byte
|
||||||
Connector string
|
Connector string
|
||||||
ActionsJSON []byte
|
ActionsJSON []byte
|
||||||
|
IgnoreLocal bool
|
||||||
|
|
||||||
Must *actions.Must
|
Must *actions.Must
|
||||||
}) {
|
}) {
|
||||||
@@ -144,6 +145,7 @@ func (this *UpdateSetPopupAction) RunPost(params struct {
|
|||||||
setConfig.Connector = params.Connector
|
setConfig.Connector = params.Connector
|
||||||
setConfig.Rules = rules
|
setConfig.Rules = rules
|
||||||
setConfig.Actions = actionConfigs
|
setConfig.Actions = actionConfigs
|
||||||
|
setConfig.IgnoreLocal = params.IgnoreLocal
|
||||||
|
|
||||||
setConfigJSON, err := json.Marshal(setConfig)
|
setConfigJSON, err := json.Marshal(setConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>规则之间的关系</td>
|
<td>规则之间的关系 *</td>
|
||||||
<td>
|
<td>
|
||||||
<select class="ui dropdown" name="connector" style="width:10em" @change="changeConnector()" v-model="selectedConnector">
|
<select class="ui dropdown" name="connector" style="width:10em" @change="changeConnector()" v-model="selectedConnector">
|
||||||
<option v-for="connector in connectors" :value="connector.value">{{connector.name}}</option>
|
<option v-for="connector in connectors" :value="connector.value">{{connector.name}}</option>
|
||||||
@@ -32,6 +32,13 @@
|
|||||||
<http-firewall-actions-box :v-actions="actions" :v-firewall-policy="firewallPolicy"></http-firewall-actions-box>
|
<http-firewall-actions-box :v-actions="actions" :v-firewall-policy="firewallPolicy"></http-firewall-actions-box>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>忽略局域网IP</td>
|
||||||
|
<td>
|
||||||
|
<checkbox name="ignoreLocal"></checkbox>
|
||||||
|
<p class="comment">选中后表示如果请求来自局域网IP,则直接跳过当前规则集。</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<submit-btn></submit-btn>
|
<submit-btn></submit-btn>
|
||||||
</form>
|
</form>
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>规则之间的关系</td>
|
<td>规则之间的关系 *</td>
|
||||||
<td>
|
<td>
|
||||||
<select class="ui dropdown" name="connector" style="width:10em" @change="changeConnector()" v-model="selectedConnector">
|
<select class="ui dropdown" name="connector" style="width:10em" @change="changeConnector()" v-model="selectedConnector">
|
||||||
<option v-for="connector in connectors" :value="connector.value">{{connector.name}}</option>
|
<option v-for="connector in connectors" :value="connector.value">{{connector.name}}</option>
|
||||||
@@ -32,6 +32,13 @@
|
|||||||
<http-firewall-actions-box :v-actions="actions" :v-firewall-policy="firewallPolicy" :v-action-configs="actionConfigs"></http-firewall-actions-box>
|
<http-firewall-actions-box :v-actions="actions" :v-firewall-policy="firewallPolicy" :v-action-configs="actionConfigs"></http-firewall-actions-box>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>忽略局域网IP</td>
|
||||||
|
<td>
|
||||||
|
<checkbox name="ignoreLocal" v-model="setConfig.ignoreLocal"></checkbox>
|
||||||
|
<p class="comment">选中后表示如果请求来自局域网IP,则直接跳过当前规则集。</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<submit-btn></submit-btn>
|
<submit-btn></submit-btn>
|
||||||
</form>
|
</form>
|
||||||
Reference in New Issue
Block a user