Updated PreviewCard, FetchLinkCardService, FetchOEmbedService

• Updated:
- PreviewCard, FetchLinkCardService, FetchOEmbedService to work better
This commit is contained in:
mgabdev
2020-07-22 13:51:08 -05:00
parent 8f4be991a0
commit 7aa7b66374
3 changed files with 8 additions and 4 deletions

View File

@@ -64,7 +64,7 @@ class FetchOEmbedService
def html
return @html if defined?(@html)
@html = @options[:html] || Request.new(:get, @url).perform do |res|
@html = @options[:html] || Request.new(:get, @url).add_headers('Accept' => 'text/html').perform do |res|
res.code != 200 || res.mime_type != 'text/html' ? nil : res.body_with_limit
end
end