1
This commit is contained in:
@@ -14,7 +14,7 @@ namespace DummyPageGenerator
|
|||||||
var result = new List<string>();
|
var result = new List<string>();
|
||||||
|
|
||||||
var random = new Random();
|
var random = new Random();
|
||||||
int countOfWords = GetWordsCount();
|
var countOfWords = GetWordsCount();
|
||||||
|
|
||||||
while (result.Count < count)
|
while (result.Count < count)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ namespace ZelWiki.Engine.Function
|
|||||||
throw new WikiFunctionPrototypeSyntaxError($"Expected '('.");
|
throw new WikiFunctionPrototypeSyntaxError($"Expected '('.");
|
||||||
}
|
}
|
||||||
|
|
||||||
int parenNest = 1;
|
var parenNest = 1;
|
||||||
|
|
||||||
readPos++;
|
readPos++;
|
||||||
|
|
||||||
|
|||||||
@@ -141,21 +141,20 @@ namespace ZelWiki
|
|||||||
options.LoginPath = new PathString($"{basePath}/Identity/Account/Login");
|
options.LoginPath = new PathString($"{basePath}/Identity/Account/Login");
|
||||||
options.LogoutPath = new PathString($"{basePath}/Identity/Account/Logout");
|
options.LogoutPath = new PathString($"{basePath}/Identity/Account/Logout");
|
||||||
options.AccessDeniedPath = new PathString($"{basePath}/Identity/Account/AccessDenied");
|
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
|
else
|
||||||
{
|
{
|
||||||
options.LoginPath = new PathString("/Identity/Account/Login");
|
options.LoginPath = new PathString("/Identity/Account/Login");
|
||||||
options.LogoutPath = new PathString("/Identity/Account/Logout");
|
options.LogoutPath = new PathString("/Identity/Account/Logout");
|
||||||
options.AccessDeniedPath = new PathString("/Identity/Account/AccessDenied");
|
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();
|
var app = builder.Build();
|
||||||
|
|
||||||
//Configure the HTTP request pipeline.
|
|
||||||
if (app.Environment.IsDevelopment())
|
if (app.Environment.IsDevelopment())
|
||||||
{
|
{
|
||||||
app.UseMigrationsEndPoint();
|
app.UseMigrationsEndPoint();
|
||||||
@@ -163,7 +162,6 @@ namespace ZelWiki
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
app.UseExceptionHandler("/Error");
|
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();
|
app.UseHsts();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -175,8 +173,6 @@ namespace ZelWiki
|
|||||||
if (!string.IsNullOrEmpty(basePath))
|
if (!string.IsNullOrEmpty(basePath))
|
||||||
{
|
{
|
||||||
app.UsePathBase(basePath);
|
app.UsePathBase(basePath);
|
||||||
|
|
||||||
// Redirect root requests to basePath (something like '/TightWiki').
|
|
||||||
app.Use(async (context, next) =>
|
app.Use(async (context, next) =>
|
||||||
{
|
{
|
||||||
if (context.Request.Path == "/")
|
if (context.Request.Path == "/")
|
||||||
@@ -198,7 +194,7 @@ namespace ZelWiki
|
|||||||
|
|
||||||
app.UseRouting();
|
app.UseRouting();
|
||||||
|
|
||||||
app.UseAuthentication(); // Ensures the authentication middleware is configured
|
app.UseAuthentication();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
|
|
||||||
app.MapRazorPages();
|
app.MapRazorPages();
|
||||||
|
|||||||
Reference in New Issue
Block a user