【发布时间】:2014-09-09 04:52:35
【问题描述】:
我想为一个控制器禁用 CSRF 安全性。我的 ApplicationController 如下所示:
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
protect_from_forgery with: :exception
以及我想跳过的控制器:
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
当 mandrill 给我发邮件时。
【问题讨论】:
标签: ruby ruby-on-rails-4 csrf mandrill csrf-protection