<?php
-$cloudEnvironmentId = getenv('CLOUDENV_ENVIRONMENT_ID');
+$codespaceName = getenv('CODESPACE_NAME');
+$codespaceDomain = getenv('GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN');
$CONFIG = [
'mail_from_address' => 'no-reply',
'memcache.local' => '\OC\Memcache\APCu',
];
-if($cloudEnvironmentId !== true) {
- $CONFIG['overwritehost'] = $cloudEnvironmentId . '-80.apps.codespaces.githubusercontent.com';
+if(is_string($codespaceName) && !empty($codespaceName) && is_string($codespaceDomain) && !empty($codespaceDomain)) {
+ $CONFIG['overwritehost'] = $codespaceName . '-80.' . $codespaceDomain;
$CONFIG['overwriteprotocol'] = 'https';
}