Do you really need this?
I know you got that from looking at another middleware class but at this point I think it's not needed. It was probably added to whatever you looked at for inspiration out of desperation.