Class: Quilt::HeaderCsrfStrategy
- Inherits:
-
Object
- Object
- Quilt::HeaderCsrfStrategy
- Defined in:
- lib/quilt_rails/header_csrf_strategy.rb
Defined Under Namespace
Classes: NoSameSiteHeaderError
Constant Summary collapse
- HEADER =
"x-shopify-react-xhr"
- HEADER_VALUE =
"1"
Instance Method Summary collapse
- #handle_unverified_request ⇒ Object
-
#initialize(controller) ⇒ HeaderCsrfStrategy
constructor
A new instance of HeaderCsrfStrategy.
Constructor Details
#initialize(controller) ⇒ HeaderCsrfStrategy
Returns a new instance of HeaderCsrfStrategy.
8 9 10 |
# File 'lib/quilt_rails/header_csrf_strategy.rb', line 8 def initialize(controller) @controller = controller end |
Instance Method Details
#handle_unverified_request ⇒ Object
12 13 14 |
# File 'lib/quilt_rails/header_csrf_strategy.rb', line 12 def handle_unverified_request raise NoSameSiteHeaderError unless same_site? end |