Skip to content

Commit

Permalink
Suppress Check For Unhandled Security Metadata (#16437)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored Jul 18, 2024
1 parent 9dccefa commit 1bda544
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ public static OrchardCoreBuilder AddMvc(this OrchardCoreBuilder builder)
{
// Allows a tenant to add its own route endpoint schemes for link generation.
collection.AddSingleton<IEndpointAddressScheme<RouteValuesAddress>, ShellRouteValuesAddressScheme>();
collection.Configure<RouteOptions>(options =>
{
// The Cors module is designed to handle CORS, thus we skip checking for unhandled security metadata by default.
// Additionally, skipping security metadata checks on the endpoint provides a minor performance benefit.
options.SuppressCheckForUnhandledSecurityMetadata = true;
});
},
// Need to be registered last.
order: int.MaxValue - 100);
Expand Down

0 comments on commit 1bda544

Please sign in to comment.