lib/onebox/engine/standard_embed.rb in onebox-1.5.21 vs lib/onebox/engine/standard_embed.rb in onebox-1.5.22

- old
+ new

@@ -18,16 +18,21 @@ opengraph_providers.push(regexp) end # Some oembed providers (like meetup.com) don't provide links to themselves add_oembed_provider /www\.flickr\.com\//, 'http://www.flickr.com/services/oembed.json' + add_oembed_provider /(.*\.)?gfycat\.com\//, 'http://gfycat.com/cajax/oembed' add_oembed_provider /www\.kickstarter\.com\//, 'https://www.kickstarter.com/services/oembed' add_oembed_provider /www\.meetup\.com\//, 'http://api.meetup.com/oembed' add_oembed_provider /www\.ted\.com\//, 'http://www.ted.com/services/v1/oembed.json' add_oembed_provider /(.*\.)?vimeo\.com\//, 'http://vimeo.com/api/oembed.json' # Sites that work better with OpenGraph - add_opengraph_provider /gfycat\.com\// + # add_opengraph_provider /gfycat\.com\// + + def always_https? + WhitelistedGenericOnebox.host_matches(uri, WhitelistedGenericOnebox.https_hosts) + end def raw return @raw if @raw StandardEmbed.oembed_providers.each do |regexp, endpoint|