I tested this code-path manually and site was set.  Turns out, it's set from registration/backends/default/__init__.py, where it's constructed from the HTTP request, via a RequestSite object.

I think your suggestion to do an if...else or  value1 or value2 is a good suggestion for this one and the other.

Running LiveServerTestCase unit tests on the central server pointed out that this rigidness can be detrimental--it can lead to inconsistencies, at least in test environments if not elsewhere.  And we don't need to hardcode the central_server_host and then require users to set it, if we can find a good way to get at it dynamically.

Once concern: in ASP/PHP, HTTP_HOST comes directly from the request "HOST" header, and it's usually ignored.  So in some sense, it could be spoofed--from a user input.  Perhaps there's a better way to keep things dynamic.