Skip to content
Snippets Groups Projects
Commit e7d55df3 authored by Yamagishi Kazutoshi's avatar Yamagishi Kazutoshi Committed by Eugen Rochko
Browse files

Ignore HEAD method if does not support (#5949)

parent a72d03f4
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment