mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Ignore HEAD method if does not support (#5949)
This commit is contained in:
parent
a72d03f43c
commit
e7d55df38d
@ -38,7 +38,7 @@ class FetchLinkCardService < BaseService
|
||||
@card ||= PreviewCard.new(url: @url)
|
||||
res = Request.new(:head, @url).perform
|
||||
|
||||
return if res.code != 200 || res.mime_type != 'text/html'
|
||||
return if res.code != 405 && (res.code != 200 || res.mime_type != 'text/html')
|
||||
|
||||
attempt_oembed || attempt_opengraph
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user