Skip to content
This repository was archived by the owner on Dec 8, 2018. It is now read-only.
This repository was archived by the owner on Dec 8, 2018. It is now read-only.

Cannot configure multiple paths over same custom port #514

@herrirya

Description

@herrirya

It appears it is not possible to have multiple paths that use the same custom port number (which is likely unintentional). For example:

app.UseHealthChecks("/health/live", port: 9999);
app.UseHealthChecks("/health/ready", port: 9999);

The second configured path in the example ("/health/ready") is not accessible because the first configured path is hogging up the port - seemingly due to the equality condition set up in HealthCheckApplicationBuilderExtensions.cs UseHealthChecksCore() method, line 214.

app.MapWhen(
  c => c.Connection.LocalPort == port,
  b0 => b0.Map(path, b1 => b1.UseMiddleware<HealthCheckMiddleware>(args)));

This middleware is great; thank you for your work.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions