From 6b1aa5f4b7e37df79661350f217dfc3af02d2af9 Mon Sep 17 00:00:00 2001 From: Snider Date: Mon, 2 Mar 2026 17:38:25 +0000 Subject: [PATCH] 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 --- src/Core/Helpers/Cdn.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Core/Helpers/Cdn.php b/src/Core/Helpers/Cdn.php index 98cc60d..ad4d8b6 100644 --- a/src/Core/Helpers/Cdn.php +++ b/src/Core/Helpers/Cdn.php @@ -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); } /**