修正拦截策略allow http2开关

This commit is contained in:
wangwei
2019-06-08 17:28:09 +08:00
parent 2bee7a7f68
commit a821ca4364
4 changed files with 16 additions and 16 deletions

View File

@@ -899,7 +899,7 @@ public class ExportExcel {
//allow_http2 //allow_http2
if("ssl_ver_allow_http2".equals(headerStr)) { if("ssl_ver_allow_http2".equals(headerStr)) {
commentStr=""; commentStr="";
defaultValue="1"; defaultValue="0";
commentStr=msgProp.getProperty("select")+":\n"+commentStr; commentStr=msgProp.getProperty("select")+":\n"+commentStr;
index++; index++;
commentStr+=1+""+msgProp.getProperty("yes")+"\n"; commentStr+=1+""+msgProp.getProperty("yes")+"\n";

View File

@@ -720,7 +720,7 @@ public class CheckIpFormatThread implements Callable<String>{
} }
} }
if(allowHttp2==null) { if(allowHttp2==null) {
allowHttp2=1; allowHttp2=0;
map.put("allow_http2", allowHttp2); map.put("allow_http2", allowHttp2);
}else { }else {
if(allowHttp2!=0&&allowHttp2!=1) { if(allowHttp2!=0&&allowHttp2!=1) {

View File

@@ -667,16 +667,8 @@ public class CheckStringFormatThread implements Callable<String>{
map.put("mirror_client", mirrorClient); map.put("mirror_client", mirrorClient);
} }
} }
if(mirrorClient==0) {
int minSort=0,maxSort=0;
if(StringUtils.isBlank(min)) {
min="ssl3";
}
if(StringUtils.isBlank(max)) {
max="tls13";
}
if(allowHttp2==null) { if(allowHttp2==null) {
allowHttp2=1; allowHttp2=0;
map.put("allow_http2", allowHttp2); map.put("allow_http2", allowHttp2);
}else { }else {
if(allowHttp2!=0&&allowHttp2!=1) { if(allowHttp2!=0&&allowHttp2!=1) {
@@ -686,6 +678,14 @@ public class CheckStringFormatThread implements Callable<String>{
map.put("allow_http2", allowHttp2); map.put("allow_http2", allowHttp2);
} }
} }
if(mirrorClient==0) {
int minSort=0,maxSort=0;
if(StringUtils.isBlank(min)) {
min="ssl3";
}
if(StringUtils.isBlank(max)) {
max="tls13";
}
for(SysDataDictionaryItem sslversion: sslversions) { for(SysDataDictionaryItem sslversion: sslversions) {
if(sslversion.getItemCode().equals(min)) { if(sslversion.getItemCode().equals(min)) {
minSort=sslversion.getItemSort(); minSort=sslversion.getItemSort();

View File

@@ -878,8 +878,8 @@ legend{padding:.5em;border:0;width:auto;font-family: "Open Sans", sans-serif;col
</label> </label>
<div class="col-md-6"> <div class="col-md-6">
<div class="bootstrap-switch"> <div class="bootstrap-switch">
<input type="checkbox" id="allow_http2" name="allow_http2" class="switch form-control sslVersionCheck" <input type="checkbox" id="allow_http2" name="allow_http2" class="switch userRegion"
value="${_cfg.cfgId eq null?1:_cfg.userRegion.ssl_ver.allow_http2 }" <c:if test="${_cfg.cfgId eq null or _cfg.userRegion.ssl_ver.allow_http2 eq 1}">checked</c:if>/> value="${_cfg.userRegion.ssl_ver.allow_http2 }" <c:if test="${_cfg.userRegion.ssl_ver.allow_http2 eq 1}">checked</c:if>/>
</div> </div>
</div> </div>
<div for="allow_http2"></div> <div for="allow_http2"></div>