mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-22 12:58:06 +01:00
Skip processing when HEAD method returns 501 (#7730)
This commit is contained in:
parent
e0354aba7c
commit
e3fb528d12
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ class FetchLinkCardService < BaseService
|
|||
@card ||= PreviewCard.new(url: @url)
|
||||
|
||||
failed = Request.new(:head, @url).perform do |res|
|
||||
res.code != 405 && (res.code != 200 || res.mime_type != 'text/html')
|
||||
res.code != 405 && res.code != 501 && (res.code != 200 || res.mime_type != 'text/html')
|
||||
end
|
||||
|
||||
return if failed
|
||||
|
|
Loading…
Reference in a new issue