Skip to content

Commit 19b7c05

Browse files
committed
Added trailing slash to /Error/ path
Added a missing trailing `/` to the `UseStatusCodePagesWithReExecute()` registration. That isn't strictly necessary, but it helps avoid an otherwise unnecessary potential redirect to the canonical URL from the `[ValidateTopic]` attribute.
1 parent 59895e0 commit 19b7c05

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

OnTopic.AspNetCore.Mvc.Host/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
| Configure: Error Pages
5555
\-----------------------------------------------------------------------------------------------------------------------------*/
5656
if (!app.Environment.IsDevelopment()) {
57-
app.UseStatusCodePagesWithReExecute("/Error/{0}");
57+
app.UseStatusCodePagesWithReExecute("/Error/{0}/");
5858
app.UseExceptionHandler("/Error/500/");
5959
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
6060
app.UseHsts();

OnTopic.AspNetCore.Mvc.IntegrationTests.Host/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static void Configure(IApplicationBuilder app) {
8282
| Configure: Error Pages
8383
\-----------------------------------------------------------------------------------------------------------------------*/
8484
app.UseDeveloperExceptionPage();
85-
app.UseStatusCodePagesWithReExecute("/Error/{0}");
85+
app.UseStatusCodePagesWithReExecute("/Error/{0}/");
8686

8787
/*------------------------------------------------------------------------------------------------------------------------
8888
| Configure: Server defaults

0 commit comments

Comments
 (0)