
Request Pipeline
Guards, pipes, interceptors and exception filters wrap every handler in a predictable order.
- Guard
- Pipe
- Interceptor
- Handler
- Filter
class ApiKeyGuard(CanActivate):
async def can_activate(self, context: ExecutionContext) -> bool:
request = context.switch_to_http().get_request()
return request.headers.get("x-api-key") == "expected-value"A falsy result short-circuits the pipeline with a 403 Forbidden.


