Cookie-basierter Lokalisierer hinzugefügt

This commit is contained in:
Developer 02
2024-06-13 14:22:38 +02:00
parent 2ce69e3b3a
commit 98362c46b5
3 changed files with 207 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ using DigitalData.Core.Application;
using Microsoft.AspNetCore.Authentication.Cookies;
using NLog.Web;
using NLog;
using DigitalData.Core.API;
var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
logger.Debug("init main");
@@ -61,6 +62,8 @@ try {
builder.Services.AddDirectorySearchService();
builder.Services.AddCookieBasedLocalizer();
var app = builder.Build();
app.UseCors("DefaultCorsPolicy");
@@ -71,6 +74,8 @@ try {
app.UseSwaggerUI();
}
app.UseCookieBasedLocalizer("de-DE", "en-US");
app.UseDefaultFiles();
app.UseStaticFiles();