Sha256: ad54c1dbf9b087176ed838c8b7713f0d19958ef5129c8ee859745db720b9369d
Contents?: true
Size: 647 Bytes
Versions: 7
Compression:
Stored size: 647 Bytes
Contents
module Kms class ApplicationController < ActionController::Base before_action :authenticate_kms_user! # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception after_action :set_csrf_cookie_for_ng def set_csrf_cookie_for_ng cookies['XSRF-TOKEN'] = form_authenticity_token if protect_against_forgery? end protected def verified_request? super || cookies['XSRF-TOKEN'] == request.headers['X-XSRF-TOKEN'] end def current_ability @current_ability ||= Ability.new(current_kms_user) end end end
Version data entries
7 entries across 7 versions & 1 rubygems