From 1599e17b044587f152ec2bef151e8c4d3f7b104a Mon Sep 17 00:00:00 2001 From: ghostrigger Date: Thu, 24 Jul 2014 21:59:39 +0800 Subject: [PATCH] update facebook redirection * update for e2255d302d05f84a261acf86049d2f9378ad7df0 * includes akamai --- app/models/post.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/post.rb b/app/models/post.rb index ac8a9db64..4e358dadc 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -324,7 +324,7 @@ class Post < ActiveRecord::Base day = $5 "http://diary#{server_id}.fc2.com/cgi-sys/ed.cgi/#{username}?Y=#{year}&M=#{month}&D=#{day}" - when %r{\Ahttps?://s(?:content|photos)-[^/]+\.fbcdn\.net/hphotos-.+/\d+_(\d+)_\d+_[no]\.}i + when %r{\Ahttps?://(?:fbcdn-)?s(?:content|photos)-[^/]+\.(?:fbcdn|akamaihd)\.net/hphotos-.+/\d+_(\d+)_(?:\d+_){1,3}[no]\.}i "https://www.facebook.com/photo.php?fbid=#{$1}" when %r{\Ahttp://c(?:s|han|[1-4])\.sankakucomplex\.com/data(?:/sample)?/(?:[a-f0-9]{2}/){2}(?:sample-|preview)?([a-f0-9]{32})}i