Configuration option to set different server for asset files.
This commit is contained in:
@@ -15,6 +15,20 @@ return array(
|
||||
|
||||
'url' => '',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Asset URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The base URL used for your application's asset files, if you are serving
|
||||
| them through a different server or a content delivery network, for
|
||||
| example. If it's not set, we'll default to the application URL (above).
|
||||
| Leave off the trailing slash.
|
||||
|
|
||||
*/
|
||||
|
||||
'asset_url' => '',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Index
|
||||
|
||||
@@ -297,7 +297,9 @@ class Bundle {
|
||||
{
|
||||
if (is_null($bundle)) return static::assets(DEFAULT_BUNDLE);
|
||||
|
||||
return ($bundle != DEFAULT_BUNDLE) ? URL::base()."/bundles/{$bundle}/" : URL::base().'/';
|
||||
$server = Config::get('application.asset_url', URL::base() );
|
||||
|
||||
return ($bundle != DEFAULT_BUNDLE) ? $server."/bundles/{$bundle}/" : $server.'/';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user