- before_filter :authorize_web
- before_filter :set_locale
- before_filter :redirect_browse_params, :only => :index
- before_filter :redirect_map_params, :only => [:index, :edit, :export]
- before_filter :require_user, :only => [:edit, :welcome]
- before_filter :require_oauth, :only => [:index]
+ before_action :authorize_web
+ before_action :set_locale
+ before_action :redirect_browse_params, :only => :index
+ before_action :redirect_map_params, :only => [:index, :edit, :export]
+ before_action :require_oauth, :only => [:index]
+ before_action :require_user, :only => [:id]
+ before_action :update_totp, :only => [:index]
+
+ authorize_resource :class => false
+
+ content_security_policy(:only => :edit) do |policy|
+ policy.frame_src(*policy.frame_src, :blob)
+ end
+
+ content_security_policy(:only => :id) do |policy|
+ policy.connect_src("*")
+ policy.img_src(*policy.img_src, "*", :blob)
+ policy.script_src(*policy.script_src, :unsafe_eval)
+ policy.style_src(*policy.style_src, :unsafe_inline)
+ end