fix: require explicit CDN_ENABLED for CDN mode
CDN no longer auto-enables via subdomain config. Requires CDN_ENABLED=true in .env to prevent unexpected CDN URL generation. Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
096024d73c
commit
6b1aa5f4b7
1 changed files with 3 additions and 5 deletions
|
|
@ -52,14 +52,12 @@ class Cdn
|
|||
/**
|
||||
* Check if CDN mode is enabled.
|
||||
*
|
||||
* CDN is considered enabled if:
|
||||
* - External CDN URL is configured, OR
|
||||
* - CDN subdomain is configured (default)
|
||||
* Requires explicit CDN_ENABLED=true in .env.
|
||||
* Without it, all assets use the standard asset() helper.
|
||||
*/
|
||||
public static function isEnabled(): bool
|
||||
{
|
||||
return config('cdn.enabled', false)
|
||||
|| config('core.cdn.subdomain');
|
||||
return (bool) config('cdn.enabled', false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue