Revision cf45f59e
ID | cf45f59ee26e2d2cd123fff98cefa20f84fc9fb7 |
astakos: make middleware optional (selective)
1. Introduce SelectiveMiddlewareMixin to snf_django.
This class that can be mixed in middlware subclasses as
class MyMiddleWare(SelectiveMiddlewareMixin, DjangoMiddleWare):
base_url_prefix = '/my_service'
mark = 'my_service_id'
The DjangoMiddleWare is only called when the request.path
matches the base_url_prefix. The request is marked with
a mark unique for each middlware, so that further hooks
are also disabled.
2. Use (1) to make astakos session, csrf, message middlewares selective
so as not to interfere with other apps. This requires that their
URL space is completely distinct.
Files
- added
- modified
- copied
- renamed
- deleted