File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,6 +88,24 @@ This results in the following execution order:
8888
8989This stacking behavior ensures that middlewares are executed in a predictable and controllable order.
9090
91+ ``` mermaid
92+ sequenceDiagram
93+ participant Client
94+ participant C as Middleware C<br/>(added last · outermost)
95+ participant B as Middleware B<br/>(added second)
96+ participant A as Middleware A<br/>(added first · innermost)
97+ participant App as FastAPI app
98+
99+ Client ->> C: Request
100+ C ->> B: Request
101+ B ->> A: Request
102+ A ->> App: Request
103+ App -->> A: Response
104+ A -->> B: Response
105+ B -->> C: Response
106+ C -->> Client: Response
107+ ```
108+
91109## Other middlewares { #other-middlewares }
92110
93111You can later read more about other middlewares in the [ Advanced User Guide: Advanced Middleware] ( ../advanced/middleware.md ) .
You can’t perform that action at this time.
0 commit comments