File tree Expand file tree Collapse file tree 1 file changed +1
-20
lines changed
Expand file tree Collapse file tree 1 file changed +1
-20
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ static void ConfigureOtlpExporterOptions(OtlpExporterOptions options)
9797 options . HttpClientFactory = ( ) =>
9898 {
9999 var handler = new HttpClientHandler ( ) ;
100- handler . ServerCertificateCustomValidationCallback = ( message , cert , chain , errors ) => true ;
100+ handler . ServerCertificateCustomValidationCallback = HttpClientHandler . DangerousAcceptAnyServerCertificateValidator ;
101101 var httpClient = new HttpClient ( handler ) ;
102102 return httpClient ;
103103 } ;
@@ -114,23 +114,4 @@ public static TBuilder AddDefaultHealthChecks<TBuilder>(this TBuilder builder) w
114114
115115 return builder ;
116116 }
117-
118- public static WebApplication MapDefaultEndpoints ( this WebApplication app )
119- {
120- // Adding health checks endpoints to applications in non-development environments has security implications.
121- // See https://aka.ms/dotnet/aspire/healthchecks for details before enabling these endpoints in non-development environments.
122- if ( app . Environment . IsDevelopment ( ) )
123- {
124- // All health checks must pass for app to be considered ready to accept traffic after starting
125- app . MapHealthChecks ( "/health" ) ;
126-
127- // Only health checks tagged with the "live" tag must pass for app to be considered alive
128- app . MapHealthChecks ( "/alive" , new HealthCheckOptions
129- {
130- Predicate = r => r . Tags . Contains ( "live" )
131- } ) ;
132- }
133-
134- return app ;
135- }
136117}
You can’t perform that action at this time.
0 commit comments