]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/site_controller.rb
Credit the whole of UCL, rather than just the Bartlett / VR centre.
[rails.git] / app / controllers / site_controller.rb
index aa284ecdc100ba37135d7a8e5b9f38db35650218..b0552322ed6d808efbf7a82bae2e001eb9b104fc 100644 (file)
@@ -69,6 +69,14 @@ class SiteController < ApplicationController
       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
@@ -111,6 +119,12 @@ class SiteController < ApplicationController
   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