diff --git a/DummyPageGenerator/WordsRepository.cs b/DummyPageGenerator/WordsRepository.cs index 4b4ca53..b20947f 100644 --- a/DummyPageGenerator/WordsRepository.cs +++ b/DummyPageGenerator/WordsRepository.cs @@ -14,7 +14,7 @@ namespace DummyPageGenerator var result = new List(); var random = new Random(); - int countOfWords = GetWordsCount(); + var countOfWords = GetWordsCount(); while (result.Count < count) { diff --git a/ZelWiki.Engine.Function/FunctionParser.cs b/ZelWiki.Engine.Function/FunctionParser.cs index 0671be1..87463c3 100644 --- a/ZelWiki.Engine.Function/FunctionParser.cs +++ b/ZelWiki.Engine.Function/FunctionParser.cs @@ -111,7 +111,7 @@ namespace ZelWiki.Engine.Function throw new WikiFunctionPrototypeSyntaxError($"Expected '('."); } - int parenNest = 1; + var parenNest = 1; readPos++; diff --git a/ZelWiki/Program.cs b/ZelWiki/Program.cs index 5b2f881..0c56422 100644 --- a/ZelWiki/Program.cs +++ b/ZelWiki/Program.cs @@ -141,21 +141,20 @@ namespace ZelWiki options.LoginPath = new PathString($"{basePath}/Identity/Account/Login"); options.LogoutPath = new PathString($"{basePath}/Identity/Account/Logout"); options.AccessDeniedPath = new PathString($"{basePath}/Identity/Account/AccessDenied"); - options.Cookie.Path = basePath; // Ensure the cookie is scoped to the sub-site path. + options.Cookie.Path = basePath; } else { options.LoginPath = new PathString("/Identity/Account/Login"); options.LogoutPath = new PathString("/Identity/Account/Logout"); options.AccessDeniedPath = new PathString("/Identity/Account/AccessDenied"); - options.Cookie.Path = "/"; // Use root path if no base path is set. + options.Cookie.Path = "/"; } }); } var app = builder.Build(); - //Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { app.UseMigrationsEndPoint(); @@ -163,7 +162,6 @@ namespace ZelWiki else { app.UseExceptionHandler("/Error"); - // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } @@ -175,8 +173,6 @@ namespace ZelWiki if (!string.IsNullOrEmpty(basePath)) { app.UsePathBase(basePath); - - // Redirect root requests to basePath (something like '/TightWiki'). app.Use(async (context, next) => { if (context.Request.Path == "/") @@ -198,7 +194,7 @@ namespace ZelWiki app.UseRouting(); - app.UseAuthentication(); // Ensures the authentication middleware is configured + app.UseAuthentication(); app.UseAuthorization(); app.MapRazorPages();