Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to customize forgery protection settings #2989

Merged

Conversation

arnvald
Copy link
Contributor

@arnvald arnvald commented Feb 2, 2018

Currently protect_from_forgery is always called with with: :exception,
which might becausing problems in certain applications.

This commit enables configuration for protect_from_forgery method,
and keeps with: :exception as default settings

Currently `protect_from_forgery` is always called with `with: :exception`,
which might becausing problems in certain applications.

This commit enables configuration for `protect_from_forgery` method,
and keeps `with: :exception` as default settings
@mshibuya mshibuya merged commit 7679269 into railsadminteam:master Feb 17, 2018
@mshibuya
Copy link
Member

Nice, thanks!

@sarink
Copy link

sarink commented Nov 30, 2018

Is there anyway to disable it completely? How would one use skip_forgery_protection? https://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection/ClassMethods.html

Update: I guess we can just use the if option and pass a lambda like so { if: -> () { false } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants