Last active
March 27, 2025 19:16
-
-
Save Vatsalya-singhi/6dc58cfd2e2b4cef7e62c8f3713c6b28 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature | Purpose | Execution Timing | Common Use Case | |
---|---|---|---|---|
Middleware | Modifies incoming requests (e.g., logging, CORS) | Before reaching the controller | Logging, modifying headers, request transformations | |
Guards | Controls access based on authentication or roles | Before executing the controller logic | Role-based access, authentication checks | |
Interceptors | Modifies or transforms responses (e.g., logging, caching) | After controller processing | Response formatting, performance monitoring, error handling |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment