# HG changeset patch # User Mads Kiilerich # Date 2022-09-14 06:47:23 # Node ID ed117efc9ae952bbab966a267bbd2297d31b05e2 # Parent 2065fe5bab67ff792c501c406a3658dd9acdc0fa middleware: fix url_scheme_variable 070b8c39736f accidentally introduced a wrong assumption that url_scheme_variable is a bool. Fix to only check whether it has been set to something non-empty. diff --git a/kallithea/config/application.py b/kallithea/config/application.py --- a/kallithea/config/application.py +++ b/kallithea/config/application.py @@ -35,7 +35,7 @@ def wrap_app(app): app = SimpleGit(app, config) # Enable https redirects based on HTTP_X_URL_SCHEME set by proxy - if any(asbool(config.get(x)) for x in ['url_scheme_variable', 'force_https', 'use_htsts']): + if config.get('url_scheme_variable') or asbool(config.get('force_https')) or asbool(config.get('use_htsts')): app = HttpsFixup(app, config) app = PermanentRepoUrl(app, config)