Update useragent to recognize twitterbot/facebot
This UA was pulled from our logs. ref: https://app.fizzy.do/5986089/cards/1775
This commit is contained in:
+1
-1
@@ -18,7 +18,7 @@ GIT
|
||||
|
||||
GIT
|
||||
remote: https://github.com/basecamp/useragent
|
||||
revision: b253635dc649394c72b761f09234bfd6dc87516a
|
||||
revision: 433ca320a42db1266c4b89df74d0abdb9a880c5e
|
||||
specs:
|
||||
useragent (0.16.11)
|
||||
|
||||
|
||||
@@ -51,4 +51,14 @@ class AllowBrowserTest < ActionDispatch::IntegrationTest
|
||||
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "Facebook/Twitter bot is allowed" do
|
||||
sign_in_as :kevin
|
||||
|
||||
get cards_path, headers: {
|
||||
"User-Agent" => "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/601.2.4 (KHTML, like Gecko) Version/9.0.1 Safari/601.2.4 facebookexternalhit/1.1 Facebot Twitterbot/1.0"
|
||||
}
|
||||
|
||||
assert_response :success
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user