1
0

codespace.config.php 744 B

12345678910111213141516171819202122
  1. <?php
  2. $codespaceName = getenv('CODESPACE_NAME');
  3. $codespaceDomain = getenv('GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN');
  4. $CONFIG = [
  5. 'mail_from_address' => 'no-reply',
  6. 'mail_smtpmode' => 'smtp',
  7. 'mail_sendmailmode' => 'smtp',
  8. 'mail_domain' => 'example.com',
  9. 'mail_smtphost' => 'localhost',
  10. 'mail_smtpport' => '1025',
  11. 'memcache.local' => '\OC\Memcache\APCu',
  12. ];
  13. if(is_string($codespaceName) && !empty($codespaceName) && is_string($codespaceDomain) && !empty($codespaceDomain)) {
  14. $host = $codespaceName . '-80.' . $codespaceDomain;
  15. $CONFIG['overwritehost'] = $host;
  16. $CONFIG['overwrite.cli.url'] = 'https://' . $host;
  17. $CONFIG['overwriteprotocol'] = 'https';
  18. $CONFIG['trusted_domains'] = [ $host ];
  19. }