before_action :set_instance_presenter, only: [:new, :create, :update]
before_action :set_body_classes, only: [:new, :create, :edit, :update]
before_action :require_not_suspended!, only: [:update]
+ before_action :set_cache_headers, only: [:edit, :update]
skip_before_action :require_functional!, only: [:edit, :update]
def require_not_suspended!
forbidden if current_account.suspended?
end
+
+ def set_cache_headers
+ response.headers['Cache-Control'] = 'no-cache, no-store, max-age=0, must-revalidate'
+ end
end
before_action :store_current_location
before_action :authenticate_resource_owner!
+ before_action :set_cache_headers
include Localized
def truthy_param?(key)
ActiveModel::Type::Boolean.new.cast(params[key])
end
+
+ def set_cache_headers
+ response.headers['Cache-Control'] = 'no-cache, no-store, max-age=0, must-revalidate'
+ end
end
class Settings::BaseController < ApplicationController
before_action :set_body_classes
+ before_action :set_cache_headers
private
def set_body_classes
@body_classes = 'admin'
end
+
+ def set_cache_headers
+ response.headers['Cache-Control'] = 'no-cache, no-store, max-age=0, must-revalidate'
+ end
end