Skip to content

Commit

Permalink
Fixing a bug for PhusionPassenger::Utils::TeeInput#read in Controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgriffiniii committed Mar 9, 2020
1 parent 235a0f0 commit 9db03d7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ def json_api_request?
def json_api_params
return unless json_api_request?

payload = JSON.parse(request.body.string)
request.body.rewind
body_content = request.body.read
payload = JSON.parse(body_content)
ActionController::Parameters.new(payload)
end

Expand Down

0 comments on commit 9db03d7

Please sign in to comment.