diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 660bffcb00..06d0b1f9c8 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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