Assign webroot for static files

Removes the need for PhysicalFileProvider
This commit is contained in:
flightlevel
2018-08-05 15:31:54 +10:00
parent db39b6afd9
commit 052e382d93
3 changed files with 3 additions and 11 deletions

View File

@@ -18,7 +18,6 @@ using Microsoft.AspNetCore.Mvc.Authorization;
using Microsoft.AspNetCore.Rewrite;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.FileProviders;
using Newtonsoft.Json.Serialization;
using System;
using System.IO;
@@ -128,13 +127,7 @@ namespace Jackett.Server
app.UseRewriter(rewriteOptions);
app.UseFileServer(new FileServerOptions
{
FileProvider = new PhysicalFileProvider(Helper.ConfigService.GetContentFolder()),
RequestPath = "",
EnableDefaultFiles = true,
EnableDirectoryBrowsing = false
});
app.UseStaticFiles();
app.UseAuthentication();