Links to shared content fail when the base URL is of another tenant

If I want to reference a shared document in an OAE discussion or document then I have to put in a link to the URL of the document. Users from my own tenancy will then be able to follow the link and see the document. However, if the user is in another tenancy, they will be shown the Access Denied screen - even if the document has already been shared with them. 

For example, the URL https://oae.gatech.edu/content/gatech/eJNUAMMw1e references a document that has been shared with me. But clicking this link gives me the access denied page.
I wonder if it would be safer/faster to do `_.contains(hosts, url.parse(theUrl).host;`