|
|
|
@ -18,6 +18,8 @@ using MediaBrowser.Common.Json;
|
|
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
|
using Microsoft.AspNetCore.Authentication;
|
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
|
using Microsoft.AspNetCore.Builder;
|
|
|
|
|
using Microsoft.AspNetCore.HttpOverrides;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using Microsoft.OpenApi.Models;
|
|
|
|
|
using Swashbuckle.AspNetCore.SwaggerGen;
|
|
|
|
@ -105,6 +107,10 @@ namespace Jellyfin.Server.Extensions
|
|
|
|
|
{
|
|
|
|
|
options.AddPolicy(ServerCorsPolicy.DefaultPolicyName, ServerCorsPolicy.DefaultPolicy);
|
|
|
|
|
})
|
|
|
|
|
.Configure<ForwardedHeadersOptions>(options =>
|
|
|
|
|
{
|
|
|
|
|
options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
|
|
|
|
|
})
|
|
|
|
|
.AddMvc(opts =>
|
|
|
|
|
{
|
|
|
|
|
opts.UseGeneralRoutePrefix(baseUrl);
|
|
|
|
|