mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-04 09:58:22 +00:00
* Initial work for user settings page * Finish user setting and slot setting pages * Don't show slot upload date on home page and fix team pick redirection * Fix upload image button alignment on mobile * Fix image upload on iPhone * Remove unused css and add selected button color * Fix login email check and bump ChromeDriver to 105 * Remove duplicated code and allow users to leave fields empty * Add unpublish button on level settings and move settings button position * Don't show edit button on mini card * Self review bug fixes and users can no longer use an in-use email
26 lines
No EOL
714 B
C#
26 lines
No EOL
714 B
C#
using LBPUnion.ProjectLighthouse.Middlewares;
|
|
|
|
namespace LBPUnion.ProjectLighthouse.Servers.Website.Middlewares;
|
|
|
|
public class HandlePageErrorMiddleware : Middleware
|
|
{
|
|
public HandlePageErrorMiddleware(RequestDelegate next) : base(next)
|
|
{}
|
|
|
|
public override async Task InvokeAsync(HttpContext ctx)
|
|
{
|
|
await this.next(ctx);
|
|
if (ctx.Response.StatusCode == 404 && !ctx.Request.Path.StartsWithSegments("/gameAssets"))
|
|
{
|
|
try
|
|
{
|
|
ctx.Request.Path = "/404";
|
|
}
|
|
finally
|
|
{
|
|
// not much we can do to save us, carry on anyways
|
|
await this.next(ctx);
|
|
}
|
|
}
|
|
}
|
|
} |