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...