def test_ssl_middleware(self): if self.secure_proxy_ssl_header: cfg.CONF.set_override('secure_proxy_ssl_header', self.secure_proxy_ssl_header) middleware = ssl.SSLMiddleware(None) request = webob.Request.blank('/stacks', headers=self.headers) self.assertIsNone(middleware.process_request(request)) self.assertEqual(self.forwarded_protocol, request.environ['wsgi.url_scheme'])
def sslmiddleware_filter(app, conf, **local_conf): return ssl.SSLMiddleware(app)