From 7895e0183be9055a51d665f944064ff7df4e2580 Mon Sep 17 00:00:00 2001 From: Mario Perez Date: Sat, 5 Sep 2015 09:44:47 +0200 Subject: [PATCH] Changed protect_from_forgery to use "with :null_session" This is the preferred value for APIs --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index d83690e1b..9e7c494c5 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,5 +1,5 @@ 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 with: :null_session end