Skip to content

Commit e853ebc

Browse files
committed
Added route hints to Program configuration for clarity
Sometimes, the exact routes that configuration extensions are setting up isn't immediately obvious. To help build intuition about this, and to extend the documentation, I've added route hints as comments next to each configuration. This is a best practice we try to follow for production sites.
1 parent be25b3e commit e853ebc

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

OnTopic.AspNetCore.Mvc.Host/Program.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@
6767
/*------------------------------------------------------------------------------------------------------------------------------
6868
| Configure: MVC
6969
\-----------------------------------------------------------------------------------------------------------------------------*/
70-
app.MapTopicErrors("Error");
71-
app.MapDefaultControllerRoute();
72-
app.MapTopicRoute("Web");
73-
app.MapTopicRoute("Error");
74-
app.MapTopicSitemap();
75-
app.MapTopicRedirect();
70+
app.MapTopicErrors("Error"); // Error/{statusCode}
71+
app.MapDefaultControllerRoute(); // {controller=Home}/{action=Index}/{id?}
72+
app.MapTopicRoute("Web"); // Web/{**path}
73+
app.MapTopicRoute("Error"); // Error/{**path}
74+
app.MapTopicSitemap(); // Sitemap
75+
app.MapTopicRedirect(); // Topic/{topicId}
7676
app.MapControllers();
7777

7878
/*------------------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)