mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 22:53:56 +08:00
13c2a4886f
Uses discourse/onebox@ff9ec90 Adds a hidden site setting called disable_onebox_media_download_controls which will add controlslist="nodownload" to video and audio oneboxes, and also to the local video and audio oneboxes within Discourse.
19 lines
428 B
Ruby
19 lines
428 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Onebox
|
|
class DiscourseOneboxSanitizeConfig
|
|
module Config
|
|
DISCOURSE_ONEBOX ||=
|
|
Sanitize::Config.freeze_config(
|
|
Sanitize::Config.merge(
|
|
Sanitize::Config::ONEBOX,
|
|
attributes: Sanitize::Config.merge(
|
|
Sanitize::Config::ONEBOX[:attributes],
|
|
'aside' => [:data]
|
|
)
|
|
)
|
|
)
|
|
end
|
|
end
|
|
end
|