mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-07 07:10:27 +08:00
域名跳转增加忽略跳转前端口选项
This commit is contained in:
@@ -39,10 +39,11 @@ func (this *CreatePopupAction) RunPost(params struct {
|
||||
KeepArgs bool
|
||||
|
||||
// 域名
|
||||
DomainsAll bool
|
||||
DomainsBeforeJSON []byte
|
||||
DomainAfter string
|
||||
DomainAfterScheme string
|
||||
DomainsAll bool
|
||||
DomainsBeforeJSON []byte
|
||||
DomainBeforeIgnorePorts bool
|
||||
DomainAfter string
|
||||
DomainAfterScheme string
|
||||
|
||||
// 端口
|
||||
PortsAll bool
|
||||
@@ -128,6 +129,7 @@ func (this *CreatePopupAction) RunPost(params struct {
|
||||
return
|
||||
}
|
||||
}
|
||||
config.DomainBeforeIgnorePorts = params.DomainBeforeIgnorePorts
|
||||
if len(params.DomainAfter) == 0 {
|
||||
this.FailField("domainAfter", "请输入跳转后域名")
|
||||
return
|
||||
|
||||
@@ -130,6 +130,7 @@ Vue.component("http-host-redirect-box", {
|
||||
<div style="margin-top: 0.4em">
|
||||
<grey-label><strong>域名跳转</strong></grey-label>
|
||||
<grey-label v-if="redirect.domainAfterScheme != null && redirect.domainAfterScheme.length > 0">{{redirect.domainAfterScheme}}</grey-label>
|
||||
<grey-label v-if="redirect.domainBeforeIgnorePorts">忽略端口</grey-label>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="redirect.type == 'port'">
|
||||
|
||||
@@ -80,6 +80,13 @@
|
||||
<domains-box name="domainsBeforeJSON" :v-domains="redirect.domainsBefore"></domains-box>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color-border">忽略跳转前端口</td>
|
||||
<td>
|
||||
<checkbox name="domainBeforeIgnorePorts" v-model="redirect.domainBeforeIgnorePorts"></checkbox>
|
||||
<p class="comment">选中后,表示忽略跳转前域名端口,只要域名匹配时就跳转;如不选中,则表示只有域名和端口同时匹配时才会跳转。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="color-border">跳转后域名 *</td>
|
||||
<td>
|
||||
|
||||
@@ -21,6 +21,7 @@ Tea.context(function () {
|
||||
|
||||
domainsAll: false,
|
||||
domainBefore: [],
|
||||
domainBeforeIgnorePorts: true,
|
||||
domainAfter: "",
|
||||
domainAfterScheme: "",
|
||||
|
||||
|
||||
Reference in New Issue
Block a user