mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-30 03:13:17 +01:00
Target net6.0
This commit is contained in:
@@ -23,7 +23,7 @@ namespace Jellyfin.Server.Configuration
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<CorsPolicy> GetPolicyAsync(HttpContext context, string policyName)
|
||||
public Task<CorsPolicy?> GetPolicyAsync(HttpContext context, string? policyName)
|
||||
{
|
||||
var corsHosts = _serverConfigurationManager.Configuration.CorsHosts;
|
||||
var builder = new CorsPolicyBuilder()
|
||||
@@ -43,7 +43,7 @@ namespace Jellyfin.Server.Configuration
|
||||
.AllowCredentials();
|
||||
}
|
||||
|
||||
return Task.FromResult(builder.Build());
|
||||
return Task.FromResult<CorsPolicy?>(builder.Build());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace Jellyfin.Server.Infrastructure
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override Task WriteFileAsync(ActionContext context, PhysicalFileResult result, RangeItemHeaderValue range, long rangeLength)
|
||||
protected override Task WriteFileAsync(ActionContext context, PhysicalFileResult result, RangeItemHeaderValue? range, long rangeLength)
|
||||
{
|
||||
if (context == null)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<PropertyGroup>
|
||||
<AssemblyName>jellyfin</AssemblyName>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ServerGarbageCollection>false</ServerGarbageCollection>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
|
||||
@@ -27,7 +27,11 @@ namespace Jellyfin.Server.Middleware
|
||||
/// <returns>The async task.</returns>
|
||||
public async Task Invoke(HttpContext httpContext)
|
||||
{
|
||||
httpContext.Features.Set<IQueryFeature>(new UrlDecodeQueryFeature(httpContext.Features.Get<IQueryFeature>()));
|
||||
var feature = httpContext.Features.Get<IQueryFeature>();
|
||||
if (feature != null)
|
||||
{
|
||||
httpContext.Features.Set<IQueryFeature>(new UrlDecodeQueryFeature(feature));
|
||||
}
|
||||
|
||||
await _next(httpContext).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user