We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 47e4852 + 150e31e commit 1548a8aCopy full SHA for 1548a8a
app/controllers/application_controller.rb
@@ -1,5 +1,6 @@
1
class ApplicationController < ActionController::Base
2
# Prevent CSRF attacks by raising an exception.
3
# For APIs, you may want to use :null_session instead.
4
- protect_from_forgery with: :exception
+ protect_from_forgery with: :exception,
5
+ if: proc { request.headers["X-Auth"] != "tutorial_secret" }
6
end
0 commit comments