Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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