Skip to content

Commit

Permalink
feat: enable reverse-proxy middleware via env var
Browse files Browse the repository at this point in the history
Allow enabling the reverse-proxy-aware middleware via environment variable: `BEETS_WEBROUTER_REVERSE_PROXY=true`
  • Loading branch information
mgoltzsche committed May 14, 2024
1 parent 1d8b27e commit 9ad74c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beetsplug/webrouter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9ad74c9

Please sign in to comment.