mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 04:19:26 +08:00
Update config.js
This commit is contained in:
+10
-22
@@ -126,28 +126,16 @@ $('input[name="bind_ssl"]').click(function(){
|
||||
yes: function(){
|
||||
|
||||
var cert_type = $('select[name=cert_type]').val();
|
||||
if ( cert_type == 0 ){
|
||||
$.post('/config/set_panel_local_ssl',{'cert_type':cert_type}, function(rdata){
|
||||
// console.log(rdata);
|
||||
var to_https = window.location.href.replace('http','https');
|
||||
showMsg(rdata.msg,function(){
|
||||
if (rdata.status){
|
||||
window.location.href = to_https;
|
||||
}
|
||||
},{icon:rdata.status?1:2},5000);
|
||||
},'json');
|
||||
} else if (cert_type == 1){
|
||||
$.post('/config/set_panel_acme_ssl',{'cert_type':cert_type}, function(rdata){
|
||||
// console.log(rdata);
|
||||
var to_https = window.location.href.replace('http','https');
|
||||
showMsg(rdata.msg,function(){
|
||||
if (rdata.status){
|
||||
window.location.href = to_https;
|
||||
}
|
||||
},{icon:rdata.status?1:2},5000);
|
||||
},'json');
|
||||
}
|
||||
|
||||
$.post('/config/set_panel_local_ssl',{'cert_type':cert_type}, function(rdata){
|
||||
// console.log(rdata);
|
||||
var to_https = window.location.href.replace('http','https');
|
||||
showMsg(rdata.msg,function(){
|
||||
if (rdata.status){
|
||||
window.location.href = to_https;
|
||||
}
|
||||
},{icon:rdata.status?1:2},5000);
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user