From 37fd5c8f2a080a4562382cd855bcd893aa27a54d Mon Sep 17 00:00:00 2001 From: Jussiles Date: Thu, 7 Sep 2023 13:35:37 +0300 Subject: [PATCH] UHF-8081: add sentry env config. --- public/sites/default/all.settings.php | 3 +++ public/themes/custom/hdbt_subtheme/hdbt_subtheme.theme | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/public/sites/default/all.settings.php b/public/sites/default/all.settings.php index 13eacc63d..87e0a660d 100644 --- a/public/sites/default/all.settings.php +++ b/public/sites/default/all.settings.php @@ -19,3 +19,6 @@ // Elastic proxy URL. $config['elastic_proxy.settings']['elastic_proxy_url'] = getenv('ELASTIC_PROXY_URL'); + +// Sentry DSN for React. +$config['react_search.settings']['sentry_dsn_react'] = getenv('SENTRY_DSN_REACT'); diff --git a/public/themes/custom/hdbt_subtheme/hdbt_subtheme.theme b/public/themes/custom/hdbt_subtheme/hdbt_subtheme.theme index 07811df2e..29278f0b0 100644 --- a/public/themes/custom/hdbt_subtheme/hdbt_subtheme.theme +++ b/public/themes/custom/hdbt_subtheme/hdbt_subtheme.theme @@ -140,6 +140,11 @@ function hdbt_subtheme_preprocess_page__news(array &$variables) { $variables['#attached']['drupalSettings']['helfi_news_archive']['elastic_proxy_url'] = $config->get('elastic_proxy_url'); } + $react_search_config = \Drupal::config('react_search.settings'); + if ($sentry_dsn_react = $react_search_config->get('sentry_dsn_react')) { + $variables['#attached']['drupalSettings']['helfi_react_search']['sentry_dsn_react'] = $sentry_dsn_react; + } + $feed_base_url = Url::fromRoute('view.news_archive.feed_1')->toString(); if ($feed_base_url) {