Remote forgery protection for json requests to the api/v1 endpoints

Due to my testing, I incorrectly removed the forgery protection
skip action from the controllers in the api. This fixes that and allows jsonp
calls to work correctly
This commit is contained in:
Rob Smith 2016-09-15 20:33:44 -07:00
parent 70e0f42bbb
commit de4563ddb1
5 changed files with 15 additions and 0 deletions

View file

@ -4,6 +4,9 @@ module Api
load_resource :conference, find_by: :short_title
respond_to :json
# Disable forgery protection for any json requests. This is required for jsonp support
skip_before_action :verify_authenticity_token
def index
if @conference
users = User.joins(event_users: { event: { program: :conference} })