diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-02-06 11:25:18 +0100 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-06 16:47:29 -0600 |
commit | 53648857c79537f4423dd70a518fb9f6c7bc1bab (patch) | |
tree | 4e77e571f622d8f2604424e1dec4feb1dc2ecbe5 /config | |
parent | 90802c9acd64d4ad6de05fae13efd3a97b4c6043 (diff) |
Add environment variable to specify extra data hosts
Fixes #1276
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/content_security_policy.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index cd696526d..0b2e9f232 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -23,6 +23,8 @@ if Rails.env.production? data_hosts << "https://#{url.host}" end + data_hosts.concat(ENV['EXTRA_DATA_HOSTS'].split('|')) if ENV['EXTRA_DATA_HOSTS'] + data_hosts.uniq! Rails.application.config.content_security_policy do |p| |