Last active
December 22, 2015 01:29
-
-
Save spidergears/6396913 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def verified_request? | |
!protect_against_forgery? || request.get? || request.head? || | |
form_authenticity_token == params[request_forgery_protection_token] || | |
form_authenticity_token == request.headers['X-CSRF-Token'] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment