mirror of https://github.com/nextcloud/server
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
This commit is contained in:
parent
ea377578ad
commit
0776f84947
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$cloudEnvironmentId = getenv('CLOUDENV_ENVIRONMENT_ID');
|
$codespaceName = getenv('CODESPACE_NAME');
|
||||||
|
$codespaceDomain = getenv('GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN');
|
||||||
|
|
||||||
$CONFIG = [
|
$CONFIG = [
|
||||||
'mail_from_address' => 'no-reply',
|
'mail_from_address' => 'no-reply',
|
||||||
|
@ -12,7 +13,7 @@ $CONFIG = [
|
||||||
'memcache.local' => '\OC\Memcache\APCu',
|
'memcache.local' => '\OC\Memcache\APCu',
|
||||||
];
|
];
|
||||||
|
|
||||||
if($cloudEnvironmentId !== true) {
|
if(is_string($codespaceName) && !empty($codespaceName) && is_string($codespaceDomain) && !empty($codespaceDomain)) {
|
||||||
$CONFIG['overwritehost'] = $cloudEnvironmentId . '-80.apps.codespaces.githubusercontent.com';
|
$CONFIG['overwritehost'] = $codespaceName . '-80.' . $codespaceDomain;
|
||||||
$CONFIG['overwriteprotocol'] = 'https';
|
$CONFIG['overwriteprotocol'] = 'https';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue