X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/420a7289a0b08eee091f6650c2e83166df3fbe69..01faa2e287812dc4ff025172e3ae36595f2c968f:/app/controllers/site_controller.rb?ds=inline diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 2fa91256e..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'] @@ -103,9 +104,7 @@ class SiteController < ApplicationController @locale = params[:copyright_locale] || I18n.locale end - def welcome - require_user - end + def welcome; end def help; end @@ -127,7 +126,7 @@ class SiteController < ApplicationController :style_src => %w['unsafe-inline'] ) - render "id", :layout => false + render :layout => false end private