From 0f08bc1dddf9b76d1b413d66516c1039e7cfe0e4 Mon Sep 17 00:00:00 2001 From: Tim Kelty Date: Fri, 16 Feb 2024 11:45:32 -0500 Subject: [PATCH] Set a default ID --- src/Helper.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Helper.php b/src/Helper.php index c4ca0bb..975b65c 100644 --- a/src/Helper.php +++ b/src/Helper.php @@ -92,6 +92,12 @@ public static function modifyConfig(array &$config, string $appType): void return; } + // Make sure the app has an ID and it isn't the default + if (!$config['id'] || $config['id'] === 'CraftCMS') { + $projectId = App::env('CRAFT_CLOUD_PROJECT_ID'); + $config['id'] = "CraftCMS--$projectId"; + } + if ($appType === 'web') { $config['components']['session'] = function() { $config = App::sessionConfig();