Skip to content

Commit

Permalink
UHF-10012: Default to production blob storage if origin url is not co…
Browse files Browse the repository at this point in the history
…nfigured
  • Loading branch information
tuutti committed Apr 25, 2024
1 parent 4092ffe commit 48b0085
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions public/sites/default/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,12 @@ function drupal_get_env(string|array $variables) : mixed {
}
}
}
$stage_file_proxy_origin = getenv('STAGE_FILE_PROXY_ORIGIN');
$stage_file_proxy_dir = getenv('STAGE_FILE_PROXY_ORIGIN_DIR');

if ($stage_file_proxy_origin = getenv('STAGE_FILE_PROXY_ORIGIN')) {
$config['stage_file_proxy.settings']['origin'] = $stage_file_proxy_origin;
$config['stage_file_proxy.settings']['origin_dir'] = getenv('STAGE_FILE_PROXY_ORIGIN_DIR') ?: 'test';
if ($stage_file_proxy_origin || $stage_file_proxy_dir) {
$config['stage_file_proxy.settings']['origin'] = $stage_file_proxy_origin ?: 'https://stplattaprod.blob.core.windows.net';
$config['stage_file_proxy.settings']['origin_dir'] = getenv('STAGE_FILE_PROXY_ORIGIN_DIR');
$config['stage_file_proxy.settings']['hotlink'] = FALSE;
$config['stage_file_proxy.settings']['use_imagecache_root'] = FALSE;
}
Expand Down

0 comments on commit 48b0085

Please sign in to comment.