mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 22:55:36 +00:00
refactor:公共函数 full_url 默认域名不再携带协议,由浏览器自动识别或手动指定
This commit is contained in:
parent
902c2fab65
commit
2e1aedf57d
@ -150,7 +150,7 @@ if (!function_exists('full_url')) {
|
|||||||
Event::trigger('uploadConfigInit', App::getInstance());
|
Event::trigger('uploadConfigInit', App::getInstance());
|
||||||
|
|
||||||
$cdnUrl = Config::get('buildadmin.cdn_url');
|
$cdnUrl = Config::get('buildadmin.cdn_url');
|
||||||
if (!$cdnUrl) $cdnUrl = request()->upload['cdn'] ?? request()->domain();
|
if (!$cdnUrl) $cdnUrl = request()->upload['cdn'] ?? '//' . request()->host();
|
||||||
if ($domain === true) {
|
if ($domain === true) {
|
||||||
$domain = $cdnUrl;
|
$domain = $cdnUrl;
|
||||||
} elseif ($domain === false) {
|
} elseif ($domain === false) {
|
||||||
|
Loading…
Reference in New Issue
Block a user