Allow connect_src to match all sites in Potlatch
authorTom Hughes <tom@compton.nu>
Mon, 19 Nov 2018 17:34:47 +0000 (17:34 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 19 Nov 2018 17:34:47 +0000 (17:34 +0000)
It seems that Safari matches connections made from a flash application
against connect_src while Firefox uses object_src instead.

Fixes #2067

app/controllers/site_controller.rb

index 4b960e4e2b9682fd6e49036a25fff89093988bf0..5833a1e045b01cd55ab69a8e746d040bd090ae72 100644 (file)
@@ -70,6 +70,7 @@ class SiteController < ApplicationController
 
     if %w[potlatch potlatch2].include?(editor)
       append_content_security_policy_directives(
+        :connect_src => %w[*],
         :object_src => %w[*],
         :plugin_types => %w[application/x-shockwave-flash],
         :script_src => %w['unsafe-inline']