Skip to content

Commit e4b89c1

Browse files
committed
Templates use reexecution.
1 parent e89fe2d commit e4b89c1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Program.Main.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,12 @@ public static void Main(string[] args)
103103
#endif
104104
}
105105

106+
app.UseStatusCodePagesWithReExecute("/not-found", createScopeForErrors: true);
107+
106108
#if (HasHttpsProfile)
107109
app.UseHttpsRedirection();
108110

109-
#endif
111+
#endif
110112
app.UseAntiforgery();
111113

112114
app.MapStaticAssets();

src/ProjectTemplates/Web.ProjectTemplates/content/BlazorWeb-CSharp/BlazorWeb-CSharp/Program.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
app.UseHsts();
9797
#endif
9898
}
99+
app.UseStatusCodePagesWithReExecute("/not-found", createScopeForErrors: true);
99100

100101
#if (HasHttpsProfile)
101102
app.UseHttpsRedirection();

0 commit comments

Comments
 (0)