FWIW, it probably does make sense to give people flexibility to remap domains if needed (for anything, not just headless WordPress). So while use of the site_url filter would work already, there may be a situation where you don't want to remap everything.
For that scenario, I added 2 new mechanisms for the next version. You can define a CLOUDFLARE_DOMAIN PHP constant (like in your config.php, or wherever else you see fit). That will remap the site URL just for this plugin:
PHP:
define('CLOUDFLARE_DOMAIN', 'https://domain.com');
...if that constant exists, use that as the site URL, otherwise fall back to the normal site URL.
Additionally, it also checks for a
domain_mapping_siteurl()
function. If that function exists, it will call that function to remap the domain.
Between those 3 options (site_url filter, a named constant to override the site URL as well as the ability to use a custom remapping function), hopefully that should cover you?