dot.js Clientside middleware