X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/fb2c1f6cfd7895da49889f1a915c93d3e7e32a3a..b84799f481e67c7a5cf6964e228c7a617b1defc7:/app/controllers/site_controller.rb diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 4b960e4e2..57ac07501 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -12,7 +12,7 @@ class SiteController < ApplicationController authorize_resource :class => false def index - session[:location] ||= OSM.ip_location(request.env["REMOTE_ADDR"]) unless STATUS == :database_readonly || STATUS == :database_offline + session[:location] ||= OSM.ip_location(request.env["REMOTE_ADDR"]) unless Settings.status == "database_readonly" || Settings.status == "database_offline" end def permalink @@ -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'] @@ -125,7 +126,7 @@ class SiteController < ApplicationController :style_src => %w['unsafe-inline'] ) - render "id", :layout => false + render :layout => false end private