discourse/lib/onebox/engine/flickr_shortened_onebox.rb
Blake Erickson 17116c440b
SECURITY: Restrict allowed URL patterns
Restrict allowed URL patterns for oneboxes.
2025-02-04 13:32:34 -03:00

21 lines
356 B
Ruby

# frozen_string_literal: true
require_relative "./opengraph_image"
module Onebox
module Engine
class FlickrShortenedOnebox
include Engine
include StandardEmbed
include OpengraphImage
matches_domain("flic.kr")
always_https
def self.matches_path(path)
path.start_with?("/p/")
end
end
end
end