我当时很懒,但通过代码调试,旧的 onebox 可以通过使用通用 onebox 的 allowed_domains 来实现,例如:
Onebox::Engine::AllowlistedGenericOnebox.allowed_domains << hostname
preview = Onebox.preview(url, onebox_options).to_s
我当时很懒,但通过代码调试,旧的 onebox 可以通过使用通用 onebox 的 allowed_domains 来实现,例如:
Onebox::Engine::AllowlistedGenericOnebox.allowed_domains << hostname
preview = Onebox.preview(url, onebox_options).to_s