NodeJS user-agent middleware