Sha256: 2482536ad014d8b41519087ea6081cf5c9b2a4d6d6f25b98fc5cdbcf96e35e68
Contents?: true
Size: 689 Bytes
Versions: 11
Compression:
Stored size: 689 Bytes
Contents
module SocialNetworking # Top level engine controller # Inherits from host's ApplicationController. class ApplicationController < ::ApplicationController include Concerns::InvalidAuthToken CSRF_COOKIE_NAME = "XSRF-TOKEN" CSRF_HEADER_NAME = "X-XSRF-TOKEN" before_action :authenticate_participant! after_action :set_csrf_cookie_for_ng layout "tool" protected def verified_request? super || valid_authenticity_token?(session, request.headers[CSRF_HEADER_NAME]) end private def set_csrf_cookie_for_ng return unless protect_against_forgery? cookies[CSRF_COOKIE_NAME] = form_authenticity_token end end end
Version data entries
11 entries across 11 versions & 1 rubygems