add middleware requirements.