Skip to content

Commit

Permalink
handle the content type being nil
Browse files Browse the repository at this point in the history
  • Loading branch information
stuzart committed Nov 18, 2024
1 parent 9704e69 commit 311f558
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def convert_json_params
end

def json_api_request?
request.format.json? || Mime::Type.lookup(request.content_type)&.json?
request.format.json? || ( request.content_type && Mime::Type.lookup(request.content_type)&.json? )
end

# filter that responds with :not_acceptable if request rdf for non rdf capable resource
Expand Down

0 comments on commit 311f558

Please sign in to comment.