From 2a506e072d920dd000806dc8e9a520cb96ff5ed7 Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Tue, 8 Jan 2019 16:02:25 +0000 Subject: [PATCH] Devise needs to prepend forgery --- app/controllers/application_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 3a110d7..2ea86ef 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,8 +1,8 @@ class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. - protect_from_forgery with: :exception - + protect_from_forgery prepend: true, with: :exception + after_action :set_csrf_cookie_for_ng def set_csrf_cookie_for_ng