|
|
@@ -117,8 +117,13 @@ class AuthMiddleware:
|
|
|
for device in app.cache['devices']:
|
|
|
if ((header == bytes('{}_{}'.format(app.config['AUTH_HEADER'].lower(), device), 'utf-8')) and
|
|
|
(value == bytes(app.cache['devices'][device], 'utf-8'))):
|
|
|
- self.app.logger.warning('scope: {}'.format(pformat(getmembers(scope), indent=1)))
|
|
|
- self.app.logger.warning('request: {}'.format(pformat(getmembers(request), indent=1)))
|
|
|
+ await send({'type': 'http.response.start',
|
|
|
+ 'status': 200,
|
|
|
+ 'headers': [(b'content-length', b'50000')]})
|
|
|
+ await send({'type': 'http.response.body',
|
|
|
+ 'body': b'scope: {}'.format(pformat(getmembers(scope), indent=1)) + b'\nrequest: {}'.format(pformat(getmembers(request), indent=1),
|
|
|
+ 'more_body': False})
|
|
|
+
|
|
|
return await self.app(scope, receive, send)
|
|
|
# Paths "/openapi.json" and "/ui" do not require auth
|
|
|
if (('path' in scope) and
|