diff options
author | Robin Windey <ro.windey@gmail.com> | 2022-11-14 10:40:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-14 15:40:04 +0000 |
commit | 0776f849472f8eca0e1caa99374968cd54640912 (patch) | |
tree | 3603bf5198cb0603a1ef88c2db6ef961b7ec3803 /.devcontainer | |
parent | ea377578ad50809c13e792acfa2bc1bd6b94df24 (diff) | |
download | nextcloud-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
Diffstat (limited to '.devcontainer')
-rw-r--r-- | .devcontainer/codespace.config.php | 7 |
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'; } |