You are right, another HTTP header is also a possibility. It would be a really on-the-nose way for a browser to send this information, and I do know there is no standardized “local hostname” header, but nothing about Apple browsers’ peculiarities.
Yes it’s a huge can of worms