I was playing with the old onebox gem here discourse/onebox: (DEPRECATED) A gem for turning URLs into website previews (github.com) (I see it is deprecated, just trying to understand it a bit more) and couldn’t see how to set up options for it. I think there is a cache: value to set but didn’t see anything else.
When I use it with this
url = 'https://meta.discourse.org/t/upgrading-v2-2-0-beta4-
forum-with-unknown-local-changes/310241'
Onebox.preview(url).to_s
…it works fine, gives a onebox. When I use it with an og site like this:
url = 'https://bonnieplants.com/blogs/garden-fundamentals/v
egetable-garden-care-tips'
Onebox.preview(url).to_s
…it doesn’t, e.g. returns empty.
The same links in Discourse onebox ok of course. I suspect there is some sort of AllowedDomainsList regex (?) that opens it up via config and was wondering how I could use that with this gem? Can I pass that option somehow, or use it as an engine some how? I am hunting around the specs but think I am missing it.
Appreciate any insights, even if this is a deprecated gem. Thanks!