]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/site_controller.rb
Add a rake task to move user avatars to Active Storage
[rails.git] / app / controllers / site_controller.rb
index 4b960e4e2b9682fd6e49036a25fff89093988bf0..57ac075010fd837609a4170ab96883c78ff83c3d 100644 (file)
@@ -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