Allow config.origin to be a callback