Update middleware.py

Remove hardcoded module whitelies