remove middleware from config to support arbitrary middleware scripting