File tree Expand file tree Collapse file tree 3 files changed +30
-4
lines changed
Expand file tree Collapse file tree 3 files changed +30
-4
lines changed Original file line number Diff line number Diff line change 4949 $ v_ssl_signature = $ ssl_str [$ v_domain ]['SIGNATURE ' ];
5050 $ v_ssl_pub_key = $ ssl_str [$ v_domain ]['PUB_KEY ' ];
5151 $ v_ssl_issuer = $ ssl_str [$ v_domain ]['ISSUER ' ];
52+ $ v_ssl_forcessl = $ ssl_str [$ v_domain ]['FORCESSL ' ];
5253}
5354$ v_letsencrypt = $ data [$ v_domain ]['LETSENCRYPT ' ];
5455if (empty ($ v_letsencrypt )) $ v_letsencrypt = 'no ' ;
360361 $ v_ssl_key = '' ;
361362 $ v_ssl_ca = '' ;
362363 $ v_ssl = 'no ' ;
364+ $ v_ssl_forcessl = 'no ' ;
363365 $ restart_web = 'yes ' ;
364366 $ restart_proxy = 'yes ' ;
365367 }
443445 rmdir ($ tmpdir );
444446 }
445447 }
446-
447-
448+
449+ // Add Force SSL
450+ if ((!empty ($ _POST ['v_ssl_forcessl ' ])) && (!empty ($ _POST ['v_ssl ' ])) && (empty ($ _SESSION ['error_msg ' ]))) {
451+ exec (HESTIA_CMD ."v-add-web-domain-ssl-force " .$ user ." " .$ v_domain , $ output , $ return_var );
452+ check_return_code ($ return_var ,$ output );
453+ unset($ output );
454+ $ v_ssl_forcessl = 'yes ' ;
455+ }
456+
457+ // Delete Force SSL
458+ if (( $ v_ssl_forcessl == 'yes ' ) && (empty ($ _POST ['v_ssl_forcessl ' ])) && (empty ($ _SESSION ['error_msg ' ]))) {
459+ exec (HESTIA_CMD ."v-delete-web-domain-ssl-force " .$ user ." " .$ v_domain ." yes " , $ output , $ return_var );
460+ check_return_code ($ return_var ,$ output );
461+ unset($ output );
462+ $ v_ssl_forcessl = 'no ' ;
463+ }
448464
449465 // Delete web stats
450466 if ((!empty ($ v_stats )) && ($ _POST ['v_stats ' ] == 'none ' ) && (empty ($ _SESSION ['error_msg ' ]))) {
Original file line number Diff line number Diff line change 187187 < tr >
188188 < td class ="step-left ">
189189 < table style ="display:<?php if ($v_ssl == 'no' ) { echo 'none';} else {echo 'block';}?> ; " id ="ssltable ">
190- < tr >
190+ < tr >
191191 < td class ="input-label vst-text ">
192192 < label > < input type ="checkbox " size ="20 " class ="vst-checkbox " name ="v_letsencrypt " < ?php if($v_letsencrypt == 'yes' || $v_letencrypt == 'on') echo "checked=yes" ?> onclick="App.Actions.WEB.toggle_letsencrypt(this)"> < ?php print __('Lets Encrypt Support');?> </ label >
193193 </ td >
194194 </ tr >
195+ < tr >
196+ < td class ="input-label vst-text ">
197+ < label > < input type ="checkbox " size ="20 " class ="vst-checkbox " name ="v_ssl_forcessl " < ?php if($v_ssl_forcessl == 'yes') echo "checked=yes" ?> onclick="App.Actions.WEB.toggle_forcessl(this)"> < ?php print __('Force SSL/HTTPS');?> </ label >
198+ </ td >
199+ </ tr >
195200 < tr >
196201 < td class ="vst-text input-label ">
197202 < ?php print __('SSL Home Directory');?>
Original file line number Diff line number Diff line change 187187 < tr >
188188 < td class ="step-left ">
189189 < table style ="display:<?php if ($v_ssl == 'no' ) { echo 'none';} else {echo 'block';}?> ; " id ="ssltable ">
190- < tr >
190+ < tr >
191191 < td class ="input-label vst-text ">
192192 < label > < input type ="checkbox " size ="20 " class ="vst-checkbox " name ="v_letsencrypt " < ?php if($v_letsencrypt == 'yes' || $v_letencrypt == 'on') echo "checked=yes" ?> onclick="App.Actions.WEB.toggle_letsencrypt(this)"> < ?php print __('Lets Encrypt Support');?> </ label >
193193 </ td >
194194 </ tr >
195+ < tr >
196+ < td class ="input-label vst-text ">
197+ < label > < input type ="checkbox " size ="20 " class ="vst-checkbox " name ="v_ssl_forcessl " < ?php if($v_ssl_forcessl == 'yes') echo "checked=yes" ?> onclick="App.Actions.WEB.toggle_forcessl(this)"> < ?php print __('Force SSL/HTTPS');?> </ label >
198+ </ td >
199+ </ tr >
195200 < tr >
196201 < td class ="vst-text input-label ">
197202 < ?php print __('SSL Home Directory');?>
You can’t perform that action at this time.
0 commit comments