Concept Flow - Custom middleware creation
Request received by FastAPI
Middleware intercepts request
Middleware processes or modifies request
Pass request to next handler (route or next middleware)
Response generated by route
Middleware intercepts response
Middleware processes or modifies response
Response sent back to client
Middleware sits between the client and route handlers, intercepting requests and responses to process or modify them.