Update middleware.js

fixed error: 
'SyntaxError: Octal literals are not allowed in strict mode.'