removes duff security middleware