aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Windey <ro.windey@gmail.com>2022-11-14 10:40:42 +0000
committerGitHub <noreply@github.com>2022-11-14 15:40:04 +0000
commit0776f849472f8eca0e1caa99374968cd54640912 (patch)
tree3603bf5198cb0603a1ef88c2db6ef961b7ec3803
parentea377578ad50809c13e792acfa2bc1bd6b94df24 (diff)
downloadnextcloud-server-0776f849472f8eca0e1caa99374968cd54640912.tar.gz
nextcloud-server-0776f849472f8eca0e1caa99374968cd54640912.zip
Fix devcontainer url
See also: * https://github.com/community/community/discussions/5104#discussioncomment-2217052 * https://docs.github.com/en/codespaces/developing-in-codespaces/default-environment-variables-for-your-codespace#list-of-default-environment-variables
-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';
}