From 57433f9845301cd6734237ddd2fb780c1b320741 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 13 Oct 2021 16:17:17 -0400 Subject: [PATCH] Add Rails' built-in CSRF protection --- app/controllers/letter_opener_web/application_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/letter_opener_web/application_controller.rb b/app/controllers/letter_opener_web/application_controller.rb index 96a79b5..a15267f 100644 --- a/app/controllers/letter_opener_web/application_controller.rb +++ b/app/controllers/letter_opener_web/application_controller.rb @@ -2,5 +2,6 @@ module LetterOpenerWeb class ApplicationController < ActionController::Base + protect_from_forgery with: :exception end end