express middleware for headrest