changeset 8929:2065fe5bab67 stable

middleware: use config consistently in https_fixup 070b8c39736f did for unknown reasons introduce a use of the global kallithea.CONFIG . Instead, consistently use the application config object that has been passed.
author Mads Kiilerich <mads@kiilerich.com>
date Wed, 14 Sep 2022 08:47:48 +0200
parents 0f9415c2115e
children ed117efc9ae9
files kallithea/config/middleware/https_fixup.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/config/middleware/https_fixup.py	Mon Jun 27 20:50:09 2022 +0200
+++ b/kallithea/config/middleware/https_fixup.py	Wed Sep 14 08:47:48 2022 +0200
@@ -26,7 +26,6 @@
 """
 
 
-import kallithea
 from kallithea.lib.utils2 import asbool
 
 
@@ -62,7 +61,7 @@
             proto = 'https'
         else:
             # get protocol from configured WSGI environment variable
-            url_scheme_variable = kallithea.CONFIG.get('url_scheme_variable')
+            url_scheme_variable = self.config.get('url_scheme_variable')
             if url_scheme_variable:
                 proto = environ.get(url_scheme_variable)