このコミットが含まれているのは:
2026-07-18 12:15:32 +09:00
コミット 040cc3f25d
4個のファイルの変更27行の追加26行の削除
+1 -11
ファイルの表示
@@ -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