2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 18:27:13 +08:00

修复(网站):目录必须为/开头

This commit is contained in:
耗子
2022-12-01 20:19:59 +08:00
parent 408d486e76
commit 85997100ed

View File

@@ -101,6 +101,13 @@ class WebsitesController extends Controller
if (empty($credentials['path'])) {
$credentials['path'] = '/www/wwwroot/'.$credentials['name'];
}
// 如果path不以/开头,则返回错误
if (!str_starts_with($credentials['path'], '/')) {
return response()->json([
'code' => 1,
'msg' => '网站路径必须以/开头'
]);
}
// ssl默认设置为0
$credentials['ssl'] = 0;
// 运行状态默认设置为1