I think this might need a helper function (`setMiddlewareVariable`) to be convenient. (Definitely low-prio. "Webscale" for speed/efficiency-based.)