Fading Coder

One Final Commit for the Last Sprint

Developing Custom HTTP Middleware for Traefik

HTTP Middleware ConceptsIn Traefik's architecture, middleware components attach to routers and modify requests before they reach backend services, or transform responses before returning them to clients. This pattern aligns with standard HTTP middleware concepts where the primary goal is interceptin...

Advanced Flask: Dynamic Dispatching, Flash Messaging, and Middleware

Dynamic Notification DispatchingTo build a system that supports multiple notification channels (like SMS, Email, and Push Notifications) and allows quick switching via configuration, we can use dynamic module importing combined with an abstract base class.Create an abstract base class in services/no...

Implementing Django CSRF Protection via Middleware

How Django's CSRF Middleware Works Django's CSRF protection is implemented through the CsrfViewMiddleware, which intercepts requests by calling the process_view method. Here's what happens during this process: Checks if the view is decorated with @csrf_exempt Retrieves the CSRF token from either the...