Rails 6.1 will return Content-Type header without modification ... use `#media_type` instead
I got the same error message when I was upgrading my app from Rails 5.2.3 to Rails 6.0.0-rc1
config/application.rb
# this was the line before
# config.load_defaults 5.2
config.load_defaults 6.0
In my case I had to change the version from 5.2
to 6.0
You can make the warning go away by adding this to your application.rb:
config.action_dispatch.return_only_media_type_on_content_type = false
You would need to make sure that if you are using content_type anywhere in your code that you replace that with media_type before making that change.