diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/mime_types.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb index f498732feca..350388fedbe 100644 --- a/config/initializers/mime_types.rb +++ b/config/initializers/mime_types.rb @@ -13,9 +13,11 @@ Mime::Type.register "video/mp4", :mp4, [], [:m4v, :mov] Mime::Type.register "video/webm", :webm Mime::Type.register "video/ogg", :ogv -middlewares = Gitlab::Application.config.middleware -middlewares.swap(ActionDispatch::ParamsParser, ActionDispatch::ParamsParser, { - Mime::Type.lookup('application/vnd.git-lfs+json') => lambda do |body| - ActiveSupport::JSON.decode(body) - end -}) +lfs_mime_types = %w( + application/vnd.git-lfs+json + text/x-json + application/json +) + +Mime::Type.unregister :json +Mime::Type.register 'application/json', :json, lfs_mime_types |