From 3deb8874c1b97199daad808d1cd34b1b1e46f847 Mon Sep 17 00:00:00 2001 From: amercader Date: Tue, 10 Oct 2023 15:41:49 +0200 Subject: [PATCH] Add a special case for SECRET_KEY in CKAN 2.10 --- ckanext/envvars/plugin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ckanext/envvars/plugin.py b/ckanext/envvars/plugin.py index fc36ffb..c022fd7 100644 --- a/ckanext/envvars/plugin.py +++ b/ckanext/envvars/plugin.py @@ -54,6 +54,10 @@ def update_config(self, config): if config_declaration: self.declared_keys = [str(k) for k in config_declaration.iter_options()] + # SECRET_KEY is marked as internal in CKAN 2.10 but we want to + # encourage its use so we support it here + if "SECRET_KEY" not in self.declared_keys: + self.declared_keys.append("SECRET_KEY") else: self.declared_keys = None