Compare commits

..

2 commits

Author SHA1 Message Date
441546fb93
Update Dockerfile to .NET 8 2024-09-01 04:05:16 +02:00
1ddf80cb8c
Add proxy and .NET 8 support 2024-09-01 04:05:16 +02:00

View file

@ -39,19 +39,6 @@ namespace Server {
services.AddSingleton<IDatabase, Database>(); services.AddSingleton<IDatabase, Database>();
services.AddSingleton(NodaTime.DateTimeZoneProviders.Tzdb); services.AddSingleton(NodaTime.DateTimeZoneProviders.Tzdb);
services.AddSingleton<IFileStorage>((serviceProvider) => {
var conf = serviceProvider.GetRequiredService<IConfiguration>();
var section = conf.GetSection("FileStorage");
switch (section["Type"]) {
case "local": {
var dir = section["Directory"];
return new LocalFileStorage(dir!);
}
default:
throw new Exception("Unable to configure FileStorage");
}
});
services.AddControllers() services.AddControllers()
.AddNewtonsoftJson(options => { .AddNewtonsoftJson(options => {
options.SerializerSettings.ContractResolver = new DefaultContractResolver { options.SerializerSettings.ContractResolver = new DefaultContractResolver {