Django middleware for authorising remote users via a reverse proxy