Relative links for domain-based multilingual content in D8

I have a reverse proxy server (Nginx) used for a Drupal 8 server. The Drupal 8 server has two languages, each assigned to its own sub-domain. The idea is that the proxy server geo-locates the users and, from the same main domain, provides the related upstream sub-domain. I have this working.

What I’ve realized, though, is that (I think) Drupal domain-based language negotiation applies absolute URLs to translated entities (nodes, terms, etc). This means that the sub-domain is exposed. Really, I want the URLs to be relative, just like a normal Drupal site and the rest of the assets (CSS and JS).

What must I do to make this happen? Do I need to create a new language negotiator or overload the existing domain-based negotiator?

Drupal version: