Sha256: 793e018952ecf3c5807903c797c00de0ebc0059b051f357d207d99a92a3e12f9
Contents?: true
Size: 647 Bytes
Versions: 6
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_filter :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
6 entries across 6 versions & 1 rubygems