mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-18 06:40:25 +08:00
修复HSTS无法设置有效期的Bug
This commit is contained in:
@@ -1711,7 +1711,7 @@ Vue.component("ssl-config-box", {
|
|||||||
if (hsts == null) {
|
if (hsts == null) {
|
||||||
hsts = {
|
hsts = {
|
||||||
isOn: false,
|
isOn: false,
|
||||||
maxAge: 0,
|
maxAge: 31536000,
|
||||||
includeSubDomains: false,
|
includeSubDomains: false,
|
||||||
preload: false,
|
preload: false,
|
||||||
domains: []
|
domains: []
|
||||||
@@ -2101,6 +2101,25 @@ Vue.component("ssl-config-box", {
|
|||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr v-show="hsts.isOn && hstsOptionsVisible">
|
||||||
|
<td class="color-border">HSTS有效时间<em>(max-age)</em></td>
|
||||||
|
<td>
|
||||||
|
<div class="ui fields inline">
|
||||||
|
<div class="ui field">
|
||||||
|
<input type="text" name="hstsMaxAge" v-model="hsts.maxAge" maxlength="10" size="10" @input="changeHSTSMaxAge()"/>
|
||||||
|
</div>
|
||||||
|
<div class="ui field">
|
||||||
|
秒
|
||||||
|
</div>
|
||||||
|
<div class="ui field">{{hsts.days}}天</div>
|
||||||
|
</div>
|
||||||
|
<p class="comment">
|
||||||
|
<a href="" @click.prevent="setHSTSMaxAge(31536000)" :class="{active:hsts.maxAge == 31536000}">[1年/365天]</a>
|
||||||
|
<a href="" @click.prevent="setHSTSMaxAge(15768000)" :class="{active:hsts.maxAge == 15768000}">[6个月/182.5天]</a>
|
||||||
|
<a href="" @click.prevent="setHSTSMaxAge(2592000)" :class="{active:hsts.maxAge == 2592000}">[1个月/30天]</a>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr v-show="hsts.isOn && hstsOptionsVisible">
|
<tr v-show="hsts.isOn && hstsOptionsVisible">
|
||||||
<td class="color-border">HSTS包含子域名<em>(includeSubDomains)</em></td>
|
<td class="color-border">HSTS包含子域名<em>(includeSubDomains)</em></td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ Vue.component("ssl-config-box", {
|
|||||||
if (hsts == null) {
|
if (hsts == null) {
|
||||||
hsts = {
|
hsts = {
|
||||||
isOn: false,
|
isOn: false,
|
||||||
maxAge: 0,
|
maxAge: 31536000,
|
||||||
includeSubDomains: false,
|
includeSubDomains: false,
|
||||||
preload: false,
|
preload: false,
|
||||||
domains: []
|
domains: []
|
||||||
@@ -435,6 +435,25 @@ Vue.component("ssl-config-box", {
|
|||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr v-show="hsts.isOn && hstsOptionsVisible">
|
||||||
|
<td class="color-border">HSTS有效时间<em>(max-age)</em></td>
|
||||||
|
<td>
|
||||||
|
<div class="ui fields inline">
|
||||||
|
<div class="ui field">
|
||||||
|
<input type="text" name="hstsMaxAge" v-model="hsts.maxAge" maxlength="10" size="10" @input="changeHSTSMaxAge()"/>
|
||||||
|
</div>
|
||||||
|
<div class="ui field">
|
||||||
|
秒
|
||||||
|
</div>
|
||||||
|
<div class="ui field">{{hsts.days}}天</div>
|
||||||
|
</div>
|
||||||
|
<p class="comment">
|
||||||
|
<a href="" @click.prevent="setHSTSMaxAge(31536000)" :class="{active:hsts.maxAge == 31536000}">[1年/365天]</a>
|
||||||
|
<a href="" @click.prevent="setHSTSMaxAge(15768000)" :class="{active:hsts.maxAge == 15768000}">[6个月/182.5天]</a>
|
||||||
|
<a href="" @click.prevent="setHSTSMaxAge(2592000)" :class="{active:hsts.maxAge == 2592000}">[1个月/30天]</a>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr v-show="hsts.isOn && hstsOptionsVisible">
|
<tr v-show="hsts.isOn && hstsOptionsVisible">
|
||||||
<td class="color-border">HSTS包含子域名<em>(includeSubDomains)</em></td>
|
<td class="color-border">HSTS包含子域名<em>(includeSubDomains)</em></td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
Reference in New Issue
Block a user