aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-09-04 07:57:59 -0600
committercrobibero <cody@robibe.ro>2020-09-04 07:57:59 -0600
commit9f97c47936587369603caf565d6da24461274c32 (patch)
tree087d20112cd27ba176125dfb16fa6e4a15c928ae /Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
parentc404660f67e62db6a58faea2be22609ce8f54988 (diff)
parent945be64ad6dc97e1668b2656b1acc46699ca08e3 (diff)
Merge remote-tracking branch 'upstream/master' into api-doc-base-url
Diffstat (limited to 'Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs')
-rw-r--r--Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
index 283c870fd..517d77412 100644
--- a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
+++ b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
-using Jellyfin.Api;
using Jellyfin.Api.Auth;
using Jellyfin.Api.Auth.DefaultAuthorizationPolicy;
using Jellyfin.Api.Auth.DownloadPolicy;
@@ -18,7 +17,6 @@ using Jellyfin.Api.Constants;
using Jellyfin.Api.Controllers;
using Jellyfin.Server.Formatters;
using Jellyfin.Server.Models;
-using MediaBrowser.Common;
using MediaBrowser.Common.Json;
using MediaBrowser.Model.Entities;
using Microsoft.AspNetCore.Authentication;
@@ -150,6 +148,9 @@ namespace Jellyfin.Server.Extensions
})
.AddMvc(opts =>
{
+ // Allow requester to change between camelCase and PascalCase
+ opts.RespectBrowserAcceptHeader = true;
+
opts.OutputFormatters.Insert(0, new CamelCaseJsonProfileFormatter());
opts.OutputFormatters.Insert(0, new PascalCaseJsonProfileFormatter());