nextcloud/.devcontainer/codespace.config.php
Andy Scherzinger cc1686dba9
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-31 10:38:47 +02:00

27 lines
872 B
PHP

<?php
/**
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
$codespaceName = getenv('CODESPACE_NAME');
$codespaceDomain = getenv('GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN');
$CONFIG = [
'mail_from_address' => 'no-reply',
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_domain' => 'example.com',
'mail_smtphost' => 'localhost',
'mail_smtpport' => '1025',
'memcache.local' => '\OC\Memcache\APCu',
];
if(is_string($codespaceName) && !empty($codespaceName) && is_string($codespaceDomain) && !empty($codespaceDomain)) {
$host = $codespaceName . '-80.' . $codespaceDomain;
$CONFIG['overwritehost'] = $host;
$CONFIG['overwrite.cli.url'] = 'https://' . $host;
$CONFIG['overwriteprotocol'] = 'https';
$CONFIG['trusted_domains'] = [ $host ];
}