llow passing custom host and endpoint and whitelist in CSP

pull/9668/head
Oliver Günther 3 years ago
parent 2920dab7dd
commit dad8950e9b
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 4
      config/initializers/carrierwave.rb
  2. 6
      lib/open_project/configuration/helpers.rb

@ -39,12 +39,12 @@ module CarrierWave
# Ensure that the provider AWS is uppercased
provider = credentials[:provider] || 'AWS'
if [:aws, 'aws'].include? provider
provider = 'AWS'
credentials[:provider] = 'AWS'
end
CarrierWave.configure do |config|
config.fog_provider = 'fog/aws'
config.fog_credentials = { provider: provider }.merge(credentials)
config.fog_credentials = credentials
config.fog_directory = directory
config.fog_public = public

@ -92,7 +92,11 @@ module OpenProject
end
def remote_storage_hosts
[remote_storage_upload_host, remote_storage_download_host].compact
[
fog_credentials[:host],
remote_storage_upload_host,
remote_storage_download_host
].compact
end
def attachments_storage_path

Loading…
Cancel
Save