Merge pull request #1663 from nextcloud/enh/1643/set-remote-font-config-for-collabora

set remote_font_config for collabora
This commit is contained in:
Simon L 2023-01-04 12:32:35 +01:00 committed by GitHub
commit e047c2402b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -236,8 +236,16 @@ class DockerActionManager
$envs = $container->GetEnvironmentVariables()->GetVariables();
foreach($envs as $key => $env) {
$patterns = ['/%(.*)%/'];
// TODO: This whole block below is a hack and needs to get reworked in order to support multiple substitutions per line by default for all envs
if (str_starts_with($env, 'extra_params=')) {
$env = str_replace('%COLLABORA_SECCOMP_POLICY%', $this->configurationManager->GetCollaboraSeccompPolicy(), $env);
$env = str_replace('%NC_DOMAIN%', $this->configurationManager->GetDomain(), $env);
$envs[$key] = $env;
continue;
}
// Original implementation
$patterns = ['/%(.*)%/'];
if(preg_match($patterns[0], $env, $out) === 1) {
$replacements = array();