Currently Neos is displaying a random site if the request comes from an unrecognized host pattern. That should be made a bit more deterministic especially in scenarios if a bunch of subdomains of a main domain is hosted a single server.
Throw an error if no host pattern matches and more than one site is present. (That breaks stuff that previously worked in the moment a second site is created
If we throw an error if more than one site exists and no host pattern matches we have the weird situation that perfectly working sites stop working in the moment a second site is created.
Maybe a default ordering in the siteRepository could help.
PS: Offcourse the implementation in the pr above is shitty because it was a prototype the tried to be non breaking . Since we are heading to a breaking release anyway we can rename getFirstActiveSite to getDefaultSite and change the behavior. As soon as we agree how to do it i will gladly create a new pr.