mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-16 13:40:24 +08:00
自动跳转到HTTPS可以设置允许和排除的域名
This commit is contained in:
@@ -8,7 +8,16 @@ Vue.component("http-redirect-to-https-box", {
|
|||||||
isOn: false,
|
isOn: false,
|
||||||
host: "",
|
host: "",
|
||||||
port: 0,
|
port: 0,
|
||||||
status: 0
|
status: 0,
|
||||||
|
onlyDomains: [],
|
||||||
|
exceptDomains: []
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (redirectToHttpsConfig.onlyDomains == null) {
|
||||||
|
redirectToHttpsConfig.onlyDomains = []
|
||||||
|
}
|
||||||
|
if (redirectToHttpsConfig.exceptDomains == null) {
|
||||||
|
redirectToHttpsConfig.exceptDomains = []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
@@ -40,6 +49,14 @@ Vue.component("http-redirect-to-https-box", {
|
|||||||
methods: {
|
methods: {
|
||||||
changeMoreOptions: function (isVisible) {
|
changeMoreOptions: function (isVisible) {
|
||||||
this.moreOptionsVisible = isVisible
|
this.moreOptionsVisible = isVisible
|
||||||
|
},
|
||||||
|
changeOnlyDomains: function (values) {
|
||||||
|
this.redirectToHttpsConfig.onlyDomains = values
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
changeExceptDomains: function (values) {
|
||||||
|
this.redirectToHttpsConfig.exceptDomains = values
|
||||||
|
this.$forceUpdate()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
template: `<div>
|
template: `<div>
|
||||||
@@ -109,10 +126,10 @@ Vue.component("http-redirect-to-https-box", {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>域名或IP地址</td>
|
<td>跳转后域名或IP地址</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="host" v-model="redirectToHttpsConfig.host"/>
|
<input type="text" name="host" v-model="redirectToHttpsConfig.host"/>
|
||||||
<p class="comment">默认和用户正在访问的域名或IP地址一致。</p>
|
<p class="comment">默认和用户正在访问的域名或IP地址一致,不填写就表示使用当前的域名。</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -122,6 +139,20 @@ Vue.component("http-redirect-to-https-box", {
|
|||||||
<p class="comment">默认端口为443。</p>
|
<p class="comment">默认端口为443。</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>允许的域名</td>
|
||||||
|
<td>
|
||||||
|
<values-box :values="redirectToHttpsConfig.onlyDomains" @change="changeOnlyDomains"></values-box>
|
||||||
|
<p class="comment">如果填写了允许的域名,那么只有这些域名可以自动跳转。</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>排除的域名</td>
|
||||||
|
<td>
|
||||||
|
<values-box :values="redirectToHttpsConfig.exceptDomains" @change="changeExceptDomains"></values-box>
|
||||||
|
<p class="comment">如果填写了排除的域名,那么这些域名将不跳转。</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="margin"></div>
|
<div class="margin"></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user