Merge pull request #1730 from basecamp/flavorjones/twitterbot-facebot

Update useragent to recognize twitterbot/facebot
This commit is contained in:
Mike Dalessio
2025-11-25 18:09:56 -05:00
committed by GitHub
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ GIT
GIT
remote: https://github.com/basecamp/useragent
revision: b253635dc649394c72b761f09234bfd6dc87516a
revision: 433ca320a42db1266c4b89df74d0abdb9a880c5e
specs:
useragent (0.16.11)
+10
View File
@@ -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