diff --git a/DysonNetwork.Zone/Pages/Error.cshtml b/DysonNetwork.Zone/Pages/Error.cshtml index 0aa49e0..e2ef991 100644 --- a/DysonNetwork.Zone/Pages/Error.cshtml +++ b/DysonNetwork.Zone/Pages/Error.cshtml @@ -12,7 +12,7 @@
Something went wrong...
Powered by the Solar Network Pages
Path: @Model.CurrentPath
+Path: @(Model.OriginalPath ?? Model.CurrentPath)
Site ID: @(Model.Site?.Id.ToString() ?? "none")
@if (Model.ShowRequestId) { diff --git a/DysonNetwork.Zone/Pages/Error.cshtml.cs b/DysonNetwork.Zone/Pages/Error.cshtml.cs index 5bab05b..9d988f8 100644 --- a/DysonNetwork.Zone/Pages/Error.cshtml.cs +++ b/DysonNetwork.Zone/Pages/Error.cshtml.cs @@ -3,6 +3,7 @@ using DysonNetwork.Shared.Models; using DysonNetwork.Zone.Publication; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; +using Microsoft.AspNetCore.Diagnostics; namespace DysonNetwork.Zone.Pages; @@ -19,6 +20,7 @@ public class ErrorModel : PageModel public SnPublicationSite? Site { get; set; } public string? SiteName { get; set; } public string? CurrentPath { get; set; } + public string? OriginalPath { get; set; } public void OnGet() { @@ -29,5 +31,8 @@ public class ErrorModel : PageModel SiteName = Request.Headers["X-SiteName"].ToString(); CurrentPath = Request.Path; + + var statusCodeReExecuteFeature = HttpContext.Features.Get