Added forgotten middleware.py file