add elapsed processing time to response
This commit is contained in:
parent
0a21cb4420
commit
c823c51721
2 changed files with 31 additions and 1 deletions
|
|
@ -19,6 +19,7 @@ from starlette.routing import Mount, Route
|
|||
|
||||
from . import config, db
|
||||
from .db import close_connection_pool, find_ratings, open_connection_pool
|
||||
from .middleware.responsetime import ResponseTimeMiddleware
|
||||
from .models import Movie, asplain
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
|
@ -190,5 +191,8 @@ def create_app():
|
|||
],
|
||||
),
|
||||
],
|
||||
middleware=[Middleware(AuthenticationMiddleware, backend=BasicAuthBackend())],
|
||||
middleware=[
|
||||
Middleware(ResponseTimeMiddleware, header_name="Unwind-Elapsed"),
|
||||
Middleware(AuthenticationMiddleware, backend=BasicAuthBackend()),
|
||||
],
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue