Merge pull request #3454 from consul/fix_rails5_forgery_protection
Fix Invalid Authenticity Token with Rails 5
This commit is contained in:
@@ -4,6 +4,8 @@ class ApplicationController < ActionController::Base
|
||||
include HasFilters
|
||||
include HasOrders
|
||||
|
||||
protect_from_forgery with: :exception
|
||||
|
||||
before_action :authenticate_http_basic, if: :http_basic_auth_site?
|
||||
|
||||
before_action :ensure_signup_complete
|
||||
@@ -15,8 +17,6 @@ class ApplicationController < ActionController::Base
|
||||
check_authorization unless: :devise_controller?
|
||||
self.responder = ApplicationResponder
|
||||
|
||||
protect_from_forgery with: :exception
|
||||
|
||||
rescue_from CanCan::AccessDenied do |exception|
|
||||
respond_to do |format|
|
||||
format.html { redirect_to main_app.root_url, alert: exception.message }
|
||||
|
||||
Reference in New Issue
Block a user