Added an optional whitelist parameter, primarily for local destinations