このコミットが含まれているのは:
@@ -4,10 +4,6 @@ module Preview
|
||||
RASTER_IMAGE_CONTENT_TYPES = [
|
||||
'image/jpeg', 'image/png', 'image/gif', 'image/webp'
|
||||
].freeze
|
||||
REMOTE_IMAGE_CONTENT_TYPES = [
|
||||
*RASTER_IMAGE_CONTENT_TYPES,
|
||||
'image/svg+xml'
|
||||
].freeze
|
||||
HTML_MAX_BYTES = 1.megabyte
|
||||
NICONICO_XML_MAX_BYTES = 256.kilobytes
|
||||
|
||||
@@ -100,13 +96,7 @@ module Preview
|
||||
nil
|
||||
end
|
||||
|
||||
def self.allowed_remote_image_content_type?(content_type)
|
||||
mime_type = content_type.to_s.split(';', 2).first.downcase.strip
|
||||
REMOTE_IMAGE_CONTENT_TYPES.include?(mime_type)
|
||||
end
|
||||
|
||||
private_class_method :fetch_image_or_nil, :fetch_image!,
|
||||
:niconico_thumbnail_url,
|
||||
:allowed_remote_image_content_type?
|
||||
:niconico_thumbnail_url
|
||||
end
|
||||
end
|
||||
|
||||
新しい課題から参照
ユーザをブロックする