Files
discourse/lib/onebox/engine/html.rb
David Taylor 387dc8c255 DEV: Drop 'cache_onebox_response_body' feature (#32035)
This is a hidden site setting which has never been publicized, and is
not recommended for use. If we decide to add a feature like this in
future as a visible site setting, it would need many more safeguards to
prevent misuse.
2025-03-28 10:55:29 +00:00

23 lines
341 B
Ruby

# frozen_string_literal: true
module Onebox
module Engine
module HTML
private
# Overwrite for any custom headers
def http_params
{}
end
def raw
@raw ||= Onebox::Helpers.fetch_html_doc(url, http_params)
end
def html?
raw.respond_to(:css)
end
end
end
end