aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <91878298+come-nc@users.noreply.github.com>2022-11-21 17:18:51 +0100
committerGitHub <noreply@github.com>2022-11-21 17:18:51 +0100
commit83badcba82fbb8ee438708b9da115ac1eea60db9 (patch)
treee57251a440dd966db813dce47c8fe6a5be1ca831
parentd0c72cc11a14f4c1d9ca9db82ed4f2b19346bfb6 (diff)
parent0776f849472f8eca0e1caa99374968cd54640912 (diff)
downloadnextcloud-server-83badcba82fbb8ee438708b9da115ac1eea60db9.tar.gz
nextcloud-server-83badcba82fbb8ee438708b9da115ac1eea60db9.zip
Merge pull request #35146 from nextcloud/fix-codespace-url
Fix devcontainer url (closing #35145)
-rw-r--r--.devcontainer/codespace.config.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/.devcontainer/codespace.config.php b/.devcontainer/codespace.config.php
index 2818a760edb..5d883c3c9df 100644
--- a/.devcontainer/codespace.config.php
+++ b/.devcontainer/codespace.config.php
@@ -1,6 +1,7 @@
<?php
-$cloudEnvironmentId = getenv('CLOUDENV_ENVIRONMENT_ID');
+$codespaceName = getenv('CODESPACE_NAME');
+$codespaceDomain = getenv('GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN');
$CONFIG = [
'mail_from_address' => 'no-reply',
@@ -12,7 +13,7 @@ $CONFIG = [
'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';
}