From cf384109f0c6f0358c05b4d2a68e2c048ea168a8 Mon Sep 17 00:00:00 2001 From: Olivier Biesmans Date: Sun, 19 Mar 2017 21:16:26 +0000 Subject: [PATCH] Make falke8 happy and reference flask doc for the ReverseProxied class --- beetsplug/web/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/beetsplug/web/__init__.py b/beetsplug/web/__init__.py index e49fde046..3c18ebd5d 100644 --- a/beetsplug/web/__init__.py +++ b/beetsplug/web/__init__.py @@ -371,10 +371,11 @@ class WebPlugin(BeetsPlugin): cmd.func = func return [cmd] + class ReverseProxied(object): - '''Wrap the application in this middleware and configure the - front-end server to add these headers, to let you quietly bind - this to a URL other than / and to an HTTP scheme that is + '''Wrap the application in this middleware and configure the + front-end server to add these headers, to let you quietly bind + this to a URL other than / and to an HTTP scheme that is different than what is used locally. In nginx: @@ -386,6 +387,8 @@ class ReverseProxied(object): proxy_set_header X-Script-Name /myprefix; } + From: http://flask.pocoo.org/snippets/35/ + :param app: the WSGI application ''' def __init__(self, app):