swh.web.utils.middlewares module#

class swh.web.utils.middlewares.ThrottlingHeadersMiddleware(get_response=None)[source]#

Bases: object

Django middleware for inserting rate limiting related headers in HTTP response.

class swh.web.utils.middlewares.ExceptionMiddleware(get_response=None)[source]#

Bases: object

Django middleware for handling uncaught exception raised when processing a view.

process_exception(request, exception)[source]#