Reputation: 9812
I want to use lowercase URLs in my app and I can see there's a RouteOptions object documented here:
But how do you actually use RouteOptions?
I thought it would be something similar to the below, but it just generates a compiler warning saying that app.UseRouting() doesn't take any parameters:
app.UseRouting(options => {
options.<no intellisense>
});
So can someone please let me know where I can specify RouteOptions?
Upvotes: 3
Views: 1651
Reputation: 118957
You need to configure this in your ConfigureServices
method, for example:
services.Configure<RouteOptions>(options =>
{
options.LowercaseUrls = true;
});
Upvotes: 5