Refaktorierung des HomeController zur Verbesserung der Fehlerbehandlung, des Authentifizierungsprozesses und der Verwaltung der Benutzersprache.
This commit is contained in:
@@ -58,9 +58,8 @@ try
|
||||
{
|
||||
//remove option for Test*Controller
|
||||
options.Conventions.Add(new RemoveIfControllerConvention()
|
||||
.AndIf(_ => !builder.IsDevOrDiP())
|
||||
.AndIf(c => c.ControllerName.StartsWith("Test"))
|
||||
.AndIf(_ => !config.GetValue<bool>("EnableTestControllers")));
|
||||
.AndIf(_ => !builder.IsDevOrDiP() || !config.GetValue<bool>("EnableTestControllers")));
|
||||
}).AddJsonOptions(q =>
|
||||
{
|
||||
// Prevents serialization error when serializing SvgBitmap in EnvelopeReceiver
|
||||
@@ -129,7 +128,7 @@ try
|
||||
options.Cookie.HttpOnly = true; // Makes the cookie inaccessible to client-side scripts for security
|
||||
options.Cookie.SecurePolicy = CookieSecurePolicy.SameAsRequest; // Ensures cookies are sent over HTTPS only
|
||||
options.Cookie.SameSite = SameSiteMode.Strict; // Protects against CSRF attacks by restricting how cookies are sent with requests from external sites
|
||||
options.ExpireTimeSpan = TimeSpan.FromMinutes(5);
|
||||
options.ExpireTimeSpan = TimeSpan.FromMinutes(30);
|
||||
|
||||
options.Events = new CookieAuthenticationEvents
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user