I know there is a global setting for allowing content registered as a Document Link to display within a Hub Site or to go directly to the url link. However, we have use cases where sometimes we want to view a document in the site, and others where we want to point to resources on the web that are not best suited for viewing in the Hub Site and forcing the same behavior on all Document Link types is not ideal.
Some options would be to setup a gallery specific override to show links in hub or not or to add support another Content type for web resources that can be used to differentiate between documents and web resources.