mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
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:
parent
70e0f42bbb
commit
de4563ddb1
5 changed files with 15 additions and 0 deletions
|
|
@ -4,6 +4,9 @@ module Api
|
|||
load_resource 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
|
||||
render json: @conferences, serializer: ConferencesArraySerializer, callback: params['callback']
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue