URL跳转中增加例外域名和仅限域名

This commit is contained in:
GoEdgeLab
2023-11-10 11:05:05 +08:00
parent 46e247f207
commit 03a64742c7
3 changed files with 55 additions and 9 deletions

View File

@@ -45,7 +45,7 @@ Vue.component("http-host-redirect-box", {
teaweb.popup("/servers/server/settings/redirects/createPopup", {
width: "50em",
height: "30em",
height: "36em",
callback: function (resp) {
that.id++
resp.data.redirect.id = that.id
@@ -60,7 +60,7 @@ Vue.component("http-host-redirect-box", {
teaweb.popup("/servers/server/settings/redirects/createPopup", {
width: "50em",
height: "30em",
height: "36em",
callback: function (resp) {
resp.data.redirect.id = redirect.id
Vue.set(that.redirects, index, resp.data.redirect)
@@ -119,6 +119,8 @@ Vue.component("http-host-redirect-box", {
<grey-label v-if="redirect.matchPrefix">匹配前缀</grey-label>
<grey-label v-if="redirect.matchRegexp">正则匹配</grey-label>
<grey-label v-if="!redirect.matchPrefix && !redirect.matchRegexp">精准匹配</grey-label>
<grey-label v-if="redirect.exceptDomains != null && redirect.exceptDomains.length > 0" v-for="domain in redirect.exceptDomains">排除:{{domain}}</grey-label>
<grey-label v-if="redirect.onlyDomains != null && redirect.onlyDomains.length > 0" v-for="domain in redirect.onlyDomains">仅限:{{domain}}</grey-label>
</div>
</div>
<div v-if="redirect.type == 'domain'">

View File

@@ -151,13 +151,32 @@
</td>
</tr>
<tr>
<td>匹配条件</td>
<td><http-request-conds-box :v-conds="redirect.conds" @change="changeConds"></http-request-conds-box></td>
</tr>
<tr>
<td>启用当前跳转</td>
<td><checkbox name="isOn" value="1" v-model="redirect.isOn"></checkbox></td>
<td colspan="2"><more-options-indicator></more-options-indicator></td>
</tr>
<tbody v-show="moreOptionsVisible">
<tr>
<td>例外域名</td>
<td>
<domains-box name="exceptDomainsJSON" :v-domains="redirect.exceptDomains"></domains-box>
<p class="comment">这些域名<strong></strong>执行跳转。</p>
</td>
</tr>
<tr>
<td>仅限域名</td>
<td>
<domains-box name="onlyDomainsJSON" :v-domains="redirect.onlyDomains"></domains-box>
<p class="comment">只有这些域名执行跳转。</p>
</td>
</tr>
<tr>
<td>匹配条件</td>
<td><http-request-conds-box :v-conds="redirect.conds" @change="changeConds"></http-request-conds-box></td>
</tr>
<tr>
<td>启用当前跳转</td>
<td><checkbox name="isOn" value="1" v-model="redirect.isOn"></checkbox></td>
</tr>
</tbody>
</table>
<submit-btn></submit-btn>