]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/site_controller.rb
Update wiki_pages.yml
[rails.git] / app / controllers / site_controller.rb
index aa284ecdc100ba37135d7a8e5b9f38db35650218..b0552322ed6d808efbf7a82bae2e001eb9b104fc 100644 (file)
@@ -69,6 +69,14 @@ class SiteController < ApplicationController
       require_user
     end
 
       require_user
     end
 
+    if editor == "potlatch" || editor == "potlatch2"
+      append_content_security_policy_directives(
+        :object_src => %w(*),
+        :plugin_types => %w(application/x-shockwave-flash),
+        :script_src => %w('unsafe-inline')
+      )
+    end
+
     if params[:node]
       bbox = Node.find(params[:node]).bbox.to_unscaled
       @lat = bbox.centre_lat
     if params[:node]
       bbox = Node.find(params[:node]).bbox.to_unscaled
       @lat = bbox.centre_lat
@@ -111,6 +119,12 @@ class SiteController < ApplicationController
   end
 
   def id
   end
 
   def id
+    append_content_security_policy_directives(
+      :connect_src => %w(taginfo.openstreetmap.org *.mapillary.com),
+      :img_src => %w(*),
+      :script_src => %w(dev.virtualearth.net)
+    )
+
     render "id", :layout => false
   end
 
     render "id", :layout => false
   end