Skip to content

Commit

Permalink
Prefer HTTPS endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
javan committed May 7, 2015
1 parent e8f18af commit ba374f4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/oembed/providers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def add_official_provider(provider_class, sub_type=nil)
# OEmbed::Providers::Youtube.endpoint += "?iframe=0"
# * To require https embed code
# OEmbed::Providers::Youtube.endpoint += "?scheme=https"
Youtube = OEmbed::Provider.new("http://www.youtube.com/oembed?scheme=https")
Youtube = OEmbed::Provider.new("https://www.youtube.com/oembed?scheme=https")
Youtube << "http://*.youtube.com/*"
Youtube << "https://*.youtube.com/*"
Youtube << "http://*.youtu.be/*"
Expand Down Expand Up @@ -205,14 +205,14 @@ def add_official_provider(provider_class, sub_type=nil)

# Provider for slideshare.net
# http://www.slideshare.net/developers/oembed
Slideshare = OEmbed::Provider.new("http://www.slideshare.net/api/oembed/2")
Slideshare = OEmbed::Provider.new("https://www.slideshare.net/api/oembed/2")
Slideshare << "http://www.slideshare.net/*/*"
Slideshare << "http://www.slideshare.net/mobile/*/*"
add_official_provider(Slideshare)

# Provider for yfrog
# http://code.google.com/p/imageshackapi/wiki/OEMBEDSupport
Yfrog = OEmbed::Provider.new("http://www.yfrog.com/api/oembed", :json)
Yfrog = OEmbed::Provider.new("https://www.yfrog.com/api/oembed", :json)
Yfrog << "http://yfrog.com/*"
add_official_provider(Yfrog)

Expand Down Expand Up @@ -258,7 +258,7 @@ def add_official_provider(provider_class, sub_type=nil)
add_official_provider(NFBCanada)

# Provider for scribd.com
Scribd = OEmbed::Provider.new("http://www.scribd.com/services/oembed")
Scribd = OEmbed::Provider.new("https://www.scribd.com/services/oembed")
Scribd << "http://*.scribd.com/*"
add_official_provider(Scribd)

Expand All @@ -274,7 +274,7 @@ def add_official_provider(provider_class, sub_type=nil)

# Provider for soundcloud.com
# http://developers.soundcloud.com/docs/oembed
SoundCloud = OEmbed::Provider.new("http://soundcloud.com/oembed", :json)
SoundCloud = OEmbed::Provider.new("https://soundcloud.com/oembed", :json)
SoundCloud << "http://*.soundcloud.com/*"
SoundCloud << "https://*.soundcloud.com/*"
add_official_provider(SoundCloud)
Expand Down

0 comments on commit ba374f4

Please sign in to comment.