diff --git a/app/Http/Controllers/Admin/ServerController.php b/app/Http/Controllers/Admin/ServerController.php index 0a559581..9a343a37 100755 --- a/app/Http/Controllers/Admin/ServerController.php +++ b/app/Http/Controllers/Admin/ServerController.php @@ -41,7 +41,7 @@ class ServerController extends Controller $params['tags'] = json_encode($params['tags']); } - if (isset($params['tls'])) { + if ((int)$params['tls']) { if (!isset($params['tls_pem']) || !isset($params['tls_key'])) { abort(500, '开启TLS必须填写TLS证书'); }