Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Commit 341815e

Browse files
committed
[proxy]路径规则增加"是否终止往下匹配"选项
1 parent 0c56a65 commit 341815e

File tree

6 files changed

+31
-3
lines changed

6 files changed

+31
-3
lines changed

src/main/web/views/@default/proxy/locations/add.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@
6363
</td>
6464
</tr>
6565
<tbody v-show="advancedOptionsVisible">
66+
<tr>
67+
<td>是否终止往下匹配</td>
68+
<td>
69+
<div class="ui checkbox">
70+
<input type="checkbox" name="isBreak" value="1"/>
71+
<label></label>
72+
</div>
73+
<p class="comment">如果选中了此选项,一旦匹配成功,不会继续匹配其他的路径规则。</p>
74+
</td>
75+
</tr>
6676
<tr>
6777
<td>匹配条件</td>
6878
<td>

src/main/web/views/@default/proxy/locations/detail.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ <h3>基本信息 <a :href="'/proxy/locations/update?serverId=' + server.id + '&l
5959
<div class="ui label tiny" v-if="location.conds != null" v-for="cond in location.conds" style="margin-bottom:0.4em"><span >{{cond.param}} <strong style="font-style:italic">{{cond.operator}}</strong> {{cond.value}}</span></div>
6060
</td>
6161
</tr>
62+
<tr>
63+
<td>是否终止往下匹配</td>
64+
<td>
65+
<span v-if="location.isBreak"></span>
66+
<span v-if="!location.isBreak"></span>
67+
</td>
68+
</tr>
6269
<tr>
6370
<td class="color-border">文档根目录<em>(Root)</em></td>
6471
<td>

src/main/web/views/@default/proxy/locations/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@
5151
<span class="ui label tiny red" v-if="!location.on">未启用</span>
5252
<span class="ui label tiny" v-if="location.isCaseInsensitive">不区分大小写</span>
5353
<span class="ui label tiny" v-if="location.isReverse">反向匹配</span>
54-
<span class="ui label tiny" v-if="location.root.length > 0">root</span>
54+
<span class="ui label tiny" v-if="location.isBreak">break</span>
55+
<span class="ui label tiny" v-if="location.root.length > 0">root</span>
5556
<span class="ui label tiny" v-if="location.index != null && location.index.length > 0">index</span>
5657
<span class="ui label tiny" v-if="location.gzipLevel > 0">gzip:{{location.gzipLevel}}</span>
5758
<span class="ui label tiny" v-if="location.cachePolicy != null">cache</span>

src/main/web/views/@default/proxy/locations/update.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,16 @@
5555
</td>
5656
</tr>
5757
<tbody v-show="advancedOptionsVisible">
58+
<tr>
59+
<td>是否终止往下匹配</td>
60+
<td>
61+
<div class="ui checkbox">
62+
<input type="checkbox" name="isBreak" value="1" v-model="location.isBreak"/>
63+
<label></label>
64+
</div>
65+
<p class="comment">如果选中了此选项,一旦匹配成功,不会继续匹配其他的路径规则。</p>
66+
</td>
67+
</tr>
5868
<tr>
5969
<td>匹配条件</td>
6070
<td>

src/main/web/views/@default/proxy/rewrite/add.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ <h3>添加重写规则</h3>
8181
<input type="checkbox" name="isBreak" value="1"/>
8282
<label></label>
8383
</div>
84-
<p class="comment">如果选中了此选项,一旦匹配成功,不会继续匹配其他的路径规则</p>
84+
<p class="comment">如果选中了此选项,一旦匹配成功,不会继续匹配其他的重写规则或路径规则。</p>
8585
</td>
8686
</tr>
8787
<tr v-if="redirectMode == 'r'">

src/main/web/views/@default/proxy/rewrite/update.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ <h3>修改重写规则</h3>
8383
<input type="checkbox" name="isBreak" value="1" v-model="rewrite.isBreak"/>
8484
<label></label>
8585
</div>
86-
<p class="comment">如果选中了此选项,一旦匹配成功,不会继续匹配其他的路径规则</p>
86+
<p class="comment">如果选中了此选项,一旦匹配成功,不会继续匹配其他的重写规则或路径规则。</p>
8787
</td>
8888
</tr>
8989
<tr v-if="redirectMode == 'r'">

0 commit comments

Comments
 (0)