X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/420a7289a0b08eee091f6650c2e83166df3fbe69..37f8f8a28caea936b53271c9f9de36cdbaf15d0e:/app/controllers/site_controller.rb diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 2fa91256e..471e9f3c5 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