From 9ad74c9d373a010f97d6547410affc702af0dfee Mon Sep 17 00:00:00 2001 From: Max Goltzsche Date: Tue, 14 May 2024 03:41:26 +0200 Subject: [PATCH] feat: enable reverse-proxy middleware via env var Allow enabling the reverse-proxy-aware middleware via environment variable: `BEETS_WEBROUTER_REVERSE_PROXY=true` --- beetsplug/webrouter/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beetsplug/webrouter/__init__.py b/beetsplug/webrouter/__init__.py index edd5dfc..b885b3a 100644 --- a/beetsplug/webrouter/__init__.py +++ b/beetsplug/webrouter/__init__.py @@ -92,7 +92,7 @@ def _configure_app(self, app, cfg, lib): for k,v in cfg: app.config[k] = v.get() - if self.config['reverse_proxy']: + if self.config['reverse_proxy'] or os.getenv('BEETS_WEBROUTER_REVERSE_PROXY') == 'true': app.wsgi_app = ReverseProxied(app.wsgi_app) class BlueprintRoute: