mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-16 01:09:55 +00:00
Reduce CSP configuration changes with upstream (#2536)
This commit is contained in:
@@ -10,11 +10,15 @@ class ContentSecurityPolicy
|
||||
end
|
||||
|
||||
def media_hosts
|
||||
[assets_host, cdn_host_value].compact
|
||||
[assets_host, cdn_host_value].concat(extra_data_hosts).compact
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def extra_data_hosts
|
||||
ENV.fetch('EXTRA_DATA_HOSTS', '').split('|')
|
||||
end
|
||||
|
||||
def url_from_configured_asset_host
|
||||
Rails.configuration.action_controller.asset_host
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user