mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-24 19:23:41 +01:00
Ignore HEAD method if does not support (#5949)
This commit is contained in:
parent
a72d03f43c
commit
e7d55df38d
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ class FetchLinkCardService < BaseService
|
||||||
@card ||= PreviewCard.new(url: @url)
|
@card ||= PreviewCard.new(url: @url)
|
||||||
res = Request.new(:head, @url).perform
|
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
|
attempt_oembed || attempt_opengraph
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue