mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
update to net core 2.2
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:2.1.10
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2
|
||||
|
||||
LABEL com.bitwarden.product="bitwarden"
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Bit.Server
|
||||
{
|
||||
@ -14,7 +15,12 @@ namespace Bit.Server
|
||||
var builder = new WebHostBuilder()
|
||||
.UseConfiguration(config)
|
||||
.UseKestrel()
|
||||
.UseStartup<Startup>();
|
||||
.UseStartup<Startup>()
|
||||
.ConfigureLogging((hostingContext, logging) =>
|
||||
{
|
||||
logging.AddConsole().AddDebug();
|
||||
})
|
||||
.ConfigureKestrel((context, options) => { });
|
||||
|
||||
var contentRoot = config.GetValue<string>("contentRoot");
|
||||
if(string.IsNullOrWhiteSpace(contentRoot))
|
||||
|
@ -1,13 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish>
|
||||
<RootNamespace>Bit.Server</RootNamespace>
|
||||
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -5,7 +5,6 @@ using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Bit.Server
|
||||
{
|
||||
@ -30,13 +29,8 @@ namespace Bit.Server
|
||||
|
||||
public void Configure(
|
||||
IApplicationBuilder app,
|
||||
ILoggerFactory loggerFactory,
|
||||
IConfiguration configuration)
|
||||
{
|
||||
loggerFactory
|
||||
.AddConsole()
|
||||
.AddDebug();
|
||||
|
||||
if(configuration.GetValue<bool?>("serveUnknown") ?? false)
|
||||
{
|
||||
app.UseStaticFiles(new StaticFileOptions
|
||||
|
Reference in New Issue
Block a user