allow parent app to pass config directly to middleware