From cb5724b4fa59fb7ab3a1a08a071e6da5a95b70bc Mon Sep 17 00:00:00 2001 From: Maxime Alves LIRMM Date: Wed, 7 Oct 2020 13:37:31 +0200 Subject: [PATCH] [doc] lib/domain_middleware --- halfapi/lib/domain_middleware.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/halfapi/lib/domain_middleware.py b/halfapi/lib/domain_middleware.py index 6582c9a..4d77ca9 100644 --- a/halfapi/lib/domain_middleware.py +++ b/halfapi/lib/domain_middleware.py @@ -1,3 +1,7 @@ +""" +DomainMiddleware +""" + from starlette.middleware.base import BaseHTTPMiddleware from starlette.requests import Request from starlette.types import Scope, Send, Receive @@ -6,6 +10,14 @@ from .routes import api_routes from .domain import d_domains class DomainMiddleware(BaseHTTPMiddleware): + """ + DomainMiddleware adds the api routes and acls to the following scope keys : + + - domains + - api + - acl + """ + def __init__(self, app, config): super().__init__(app) self.config = config