Doesn't really makes sense to have this in a middleware now.