Enable middleware options and redefine "dev mode"