webman迁移
This commit is contained in:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user