2014-07-18 2 views
0

한 컨트롤러에 대해 CSRF 보안을 비활성화하려고합니다.컨트롤러의 CSRF 보안을 건너 뛸 수 없습니다.

class ApplicationController < ActionController::Base 
    # Prevent CSRF attacks by raising an exception. 
    protect_from_forgery with: :exception 

그리고 컨트롤러 내가 생략 할 위치 : 내와 ApplicationController은 다음과 같습니다

class HelpdeskInboxController < ApplicationController 

    skip_before_action :authenticate_user! 
    skip_before_action :verify_authenticity_token 
    prepend_before_filter :require_no_authentication 

    include Mandrill::Rails::WebHookProcessor 
    authenticate_with_mandrill_keys! MANDRILL_CONFIG['WEBHOOKS'] 

을 그리고 드릴 날을 보낼 때 내가 오류를

Can't verify CSRF token authenticity 

있어 작동하지 않습니다 이메일.

답변

0

skip_before_action :verify_authenticity_token은 레일에만 사용할 수 있습니다. 대신 skip_before_filter을 사용해보십시오.

관련 문제