webman迁移

This commit is contained in:
2026-03-08 23:57:47 +08:00
parent 3c67427bbb
commit 699761aad2
19 changed files with 145 additions and 41 deletions

View File

@@ -32,13 +32,19 @@ class Index extends Backend
return $this->error(__('No background menu, please contact super administrator!'));
}
$apiUrl = config('buildadmin.api_url');
if (!$apiUrl || $apiUrl === 'https://api.buildadmin.com') {
$scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';
$apiUrl = $scheme . '://' . $request->host();
}
return $this->success('', [
'adminInfo' => $adminInfo,
'menus' => $menus,
'siteConfig' => [
'siteName' => get_sys_config('site_name'),
'version' => get_sys_config('version'),
'apiUrl' => config('buildadmin.api_url'),
'apiUrl' => $apiUrl,
'upload' => keys_to_camel_case(get_upload_config($request), ['max_size', 'save_name', 'allowed_suffixes', 'allowed_mime_types']),
'cdnUrl' => full_url(),
'cdnUrlParams' => config('buildadmin.cdn_url_params'),