Fixed a problem where the middleware accessed POST on every request, freezing upload_...