Add Wai middleware