diff --git a/Backend/Startup.cs b/Backend/Startup.cs
index fc06b00..663e4a8 100644
--- a/Backend/Startup.cs
+++ b/Backend/Startup.cs
@@ -32,6 +32,8 @@ if (!app.Environment.IsDevelopment()) {
var provider = new FileExtensionContentTypeProvider { Mappings = { [".gpg"] = "application/pgp-signature" } };
app.UseStaticFiles(new StaticFileOptions { ContentTypeProvider = provider });
+app.UseStatusCodePagesWithReExecute("/ErrorPages/{0}");
+
app.UseSession();
app.UseRouting();
app.UseAuthorization();
@@ -39,4 +41,4 @@ app.UseAuthorization();
app.MapRazorPages();
app.MapControllers();
-app.Run();
\ No newline at end of file
+app.Run();
diff --git a/Pages/Error.cshtml b/Pages/Error.cshtml
index 8f24ea4..5e0abe5 100644
--- a/Pages/Error.cshtml
+++ b/Pages/Error.cshtml
@@ -12,14 +12,3 @@
Request ID: @Model.RequestId
- Swapping to the Development environment displays detailed information about the error that occurred. -
-- The Development environment shouldn't be enabled for deployed applications. - It can result in displaying sensitive information from exceptions to end users. - For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development - and restarting the app. -
\ No newline at end of file diff --git a/Pages/ErrorPages/404.cshtml b/Pages/ErrorPages/404.cshtml new file mode 100644 index 0000000..1e2079f --- /dev/null +++ b/Pages/ErrorPages/404.cshtml @@ -0,0 +1,7 @@ +@page +@{ + ViewData["Title"] = "error_404"; +} + +The page you requested does not exist on this server.