Skip to content

Commit

Permalink
Set dummy app forgery protection to false
Browse files Browse the repository at this point in the history
This reverts a previous change setting dummy app forgery protection to true. Rails prefers testing to be performed with forgery protection set to false.

This change will also allow for use of system specs in Solidus frontend.
  • Loading branch information
Francesco Aiello committed Jan 11, 2021
1 parent 7b15fbf commit 4ffd0d3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/lib/spree/testing_support/dummy_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

# @private
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
end

# @private
Expand Down Expand Up @@ -52,8 +53,8 @@ class Application < ::Rails::Application
config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
config.whiny_nils = true
config.consider_all_requests_local = true
config.action_controller.allow_forgery_protection = true
config.action_controller.default_protect_from_forgery = true
config.action_controller.allow_forgery_protection = false
config.action_controller.default_protect_from_forgery = false
config.action_controller.perform_caching = false
config.action_dispatch.show_exceptions = false
config.active_support.deprecation = :stderr
Expand Down

0 comments on commit 4ffd0d3

Please sign in to comment.