]> git.openstreetmap.org Git - rails.git/commitdiff
Allow inline styling on pages that display the map
authorTom Hughes <tom@compton.nu>
Mon, 31 Dec 2018 09:30:40 +0000 (09:30 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 31 Dec 2018 09:32:13 +0000 (09:32 +0000)
Both leaflet itself and at least one of our plugins use inline
styling to style markers so we need to allow it.

Fixes #2093

app/controllers/application_controller.rb

index d4bbc1f9b7147ada16f015a77f73a0fb56168aac..38758e1df4277031c64ee47b5242701890261793 100644 (file)
@@ -393,6 +393,7 @@ class ApplicationController < ActionController::Base
       :frame_src => %w[http://127.0.0.1:8111 https://127.0.0.1:8112],
       :connect_src => [NOMINATIM_URL, OVERPASS_URL, OSRM_URL, GRAPHHOPPER_URL],
       :form_action => %w[render.openstreetmap.org],
+      :style_src => %w['unsafe-inline'],
       :script_src => [MAPQUEST_DIRECTIONS_URL],
       :img_src => %w[developer.mapquest.com]
     )