wsgi: drop the (now unused) proxyfix thing and use the nosecurity context

The nosecurity middleware will put all users as admins.
1 files changed, 3 insertions(+), 20 deletions(-)

M tshistory_refinery/wsgi.py
M tshistory_refinery/wsgi.py +3 -20
@@ 1,26 1,9 @@ 
+from tshistory.http.util import nosecurity
+
 from tshistory_refinery.webapp import (
     httpapi,
     make_app
 )
 
-
-class ReverseProxied(object):
-    def __init__(self, app):
-        self.app = app
-
-    def __call__(self, environ, start_response):
-        script_name = environ.get('HTTP_X_SCRIPT_NAME', '')
-        if script_name:
-            environ['SCRIPT_NAME'] = script_name
-            path_info = environ['PATH_INFO']
-            if path_info.startswith(script_name):
-                environ['PATH_INFO'] = path_info[len(script_name):]
-
-        scheme = environ.get('HTTP_X_SCHEME', '')
-        if scheme:
-            environ['wsgi.url_scheme'] = scheme
-        return self.app(environ, start_response)
-
-
 app = make_app(httpapi=httpapi)
-app.wsgi_app = ReverseProxied(app.wsgi_app)
+app.wsgi_app = nosecurity(app.wsgi_app)