102102from app .notify_client .performance_dashboard_api_client import (
103103 performance_dashboard_api_client ,
104104)
105- from app .notify_client .platform_stats_api_client import (
106- platform_stats_api_client ,
107- )
105+ from app .notify_client .platform_stats_api_client import platform_stats_api_client
108106from app .notify_client .service_api_client import service_api_client
109107from app .notify_client .status_api_client import status_api_client
110- from app .notify_client .template_folder_api_client import (
111- template_folder_api_client ,
112- )
113- from app .notify_client .template_statistics_api_client import (
114- template_statistics_client ,
115- )
108+ from app .notify_client .template_folder_api_client import template_folder_api_client
109+ from app .notify_client .template_statistics_api_client import template_statistics_client
116110from app .notify_client .upload_api_client import upload_api_client
117111from app .notify_client .user_api_client import user_api_client
118112from app .url_converters import SimpleDateTypeConverter , TemplateTypeConverter
119113from app .utils .api_health import is_api_down
120- from app .utils .govuk_frontend_jinja .flask_ext import init_govuk_frontend
114+ from app .utils .nunjucks_jinja .flask_ext import init_nunjucks_environment
121115from notifications_python_client .errors import HTTPError
122116from notifications_utils import logging , request_helper
123117from notifications_utils .formatters import (
149143def _csp (config ):
150144 asset_domain = config ["ASSET_DOMAIN" ]
151145 api_public_url = config ["API_PUBLIC_URL" ]
152- api_public_ws_url = config ["API_PUBLIC_WS_URL" ]
153146
154147 return {
155148 "default-src" : ["'self'" , asset_domain ],
@@ -168,7 +161,6 @@ def _csp(config):
168161 "https://www.googletagmanager.com" ,
169162 "https://www.google-analytics.com" ,
170163 "https://dap.digitalgov.gov" ,
171- "https://cdn.socket.io" ,
172164 ],
173165 "connect-src" : list (
174166 dict .fromkeys (
@@ -177,7 +169,6 @@ def _csp(config):
177169 "https://gov-bam.nr-data.net" ,
178170 "https://www.google-analytics.com" ,
179171 f"{ api_public_url } " ,
180- f"{ api_public_ws_url } " ,
181172 ]
182173 )
183174 ),
@@ -198,17 +189,8 @@ def inject_is_api_down():
198189
199190 # @application.context_processor
200191 # def inject_feature_flags():
201- # this is where feature flags can be easily added as a dictionary within context
202- # feature_socket_enabled = application.config.get("FEATURE_SOCKET_ENABLED", True)
203-
204- # current_app.logger.info(
205- # f"FEATURE_SOCKET_ENABLED value in __init__.py coming \
206- # from config is {application.config.get('FEATURE_SOCKET_ENABLED')} and \
207- # the ending value is {feature_socket_enabled}"
208- # )
209- # return dict(
210- # FEATURE_SOCKET_ENABLED=feature_socket_enabled,
211- # )
192+ # this is where feature flags can be easily added as a dictionary within context
193+ # feature_enabled = application.config.get("FEATURE_ENABLED", True)
212194
213195 @application .context_processor
214196 def inject_initial_signin_url ():
@@ -246,7 +228,7 @@ def inject_initial_signin_url():
246228 if "extensions" not in application .jinja_options :
247229 application .jinja_options ["extensions" ] = []
248230
249- init_govuk_frontend (application )
231+ init_nunjucks_environment (application )
250232 init_jinja (application )
251233
252234 for client in (
0 commit comments