Looks like uri.host.ends_with?(site_uri.host) is the code that does it. It seems that try.discourse.org would not match www.discourse.org.
Are we sure we’d want it to do that? It might be weird from a security standpoint to make try match www.