Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Storefront: line items - skip `verify_authenticity_token` only for `create` action

Damian Legawiec584d103202f4
diff --git a/storefront/app/controllers/spree/line_items_controller.rb b/storefront/app/controllers/spree/line_items_controller.rb
index b309ee112d..d4e39a4abb 100644
--- a/storefront/app/controllers/spree/line_items_controller.rb
+++ b/storefront/app/controllers/spree/line_items_controller.rb
@@ -7,7 +7,7 @@ module Spree
before_action :assign_order_with_lock, except: :create
before_action :load_line_item, except: :create
- skip_before_action :verify_authenticity_token
+ skip_before_action :verify_authenticity_token, only: :create
helper 'spree/products'