File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
perf/benchmarkapps/GrpcAspNetCoreServer Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 2424using Microsoft . AspNetCore . Authentication . Certificate ;
2525using Microsoft . AspNetCore . Builder ;
2626using Microsoft . AspNetCore . Http ;
27+ using Microsoft . AspNetCore . Routing ;
2728using Microsoft . Extensions . Configuration ;
2829using Microsoft . Extensions . DependencyInjection ;
2930using Microsoft . Extensions . Hosting ;
@@ -44,9 +45,14 @@ public void ConfigureServices(IServiceCollection services)
4445 {
4546 services . AddGrpc ( o =>
4647 {
47- // Small performance benefits to not add catch-all routes to handle UNIMPLEMENTED for unknown services
48+ // Small performance benefit to not add catch-all routes to handle UNIMPLEMENTED for unknown services
4849 o . IgnoreUnknownServices = true ;
4950 } ) ;
51+ services . Configure < RouteOptions > ( c =>
52+ {
53+ // Small performance benefit to skip checking for security metadata on endpoint
54+ c . SuppressCheckForUnhandledSecurityMetadata = true ;
55+ } ) ;
5056 services . AddSingleton < BenchmarkServiceImpl > ( ) ;
5157 services . AddControllers ( ) ;
5258
You can’t perform that action at this time.
0 commit comments