Skip to content

Commit

Permalink
Fix error page
Browse files Browse the repository at this point in the history
Fixes #37
  • Loading branch information
Simyon264 committed Aug 21, 2024
1 parent 6e3f18e commit e54d2f9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion ReplayBrowser/Pages/Error.razor
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@page "/Error"
@page "/error"
@using System.Diagnostics
@using Microsoft.AspNetCore.Components.Web

Expand Down
17 changes: 6 additions & 11 deletions ReplayBrowser/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
using System.IdentityModel.Tokens.Jwt;
using System.Net;
using System.Reflection;
using System.Text.Json.Serialization;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.IdentityModel.Protocols.OpenIdConnect;
using OpenTelemetry.Metrics;
using ReplayBrowser.Data;
Expand Down Expand Up @@ -234,15 +232,12 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
return next();
});

if (!env.IsDevelopment())
{
app.UseExceptionHandler("/Error", createScopeForErrors: true);
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
} else
{
app.UseDeveloperExceptionPage();
}
#if RELEASE
app.UseExceptionHandler("/error", createScopeForErrors: true);
app.UseHsts();
#else
app.UseDeveloperExceptionPage();
#endif

app.UseHttpsRedirection();

Expand Down

0 comments on commit e54d2f9

Please sign in to comment.