Skip to content

Commit

Permalink
Set a default ID
Browse files Browse the repository at this point in the history
  • Loading branch information
timkelty committed Feb 16, 2024
1 parent a77bc2d commit 0f08bc1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 0f08bc1

Please sign in to comment.