Eigenverft.WebLib.HealthProbes
1.0.0.5
dotnet add package Eigenverft.WebLib.HealthProbes --version 1.0.0.5
NuGet\Install-Package Eigenverft.WebLib.HealthProbes -Version 1.0.0.5
<PackageReference Include="Eigenverft.WebLib.HealthProbes" Version="1.0.0.5" />
<PackageVersion Include="Eigenverft.WebLib.HealthProbes" Version="1.0.0.5" />
<PackageReference Include="Eigenverft.WebLib.HealthProbes" />
paket add Eigenverft.WebLib.HealthProbes --version 1.0.0.5
#r "nuget: Eigenverft.WebLib.HealthProbes, 1.0.0.5"
#:package Eigenverft.WebLib.HealthProbes@1.0.0.5
#addin nuget:?package=Eigenverft.WebLib.HealthProbes&version=1.0.0.5
#tool nuget:?package=Eigenverft.WebLib.HealthProbes&version=1.0.0.5
Eigenverft.WebLib.HealthProbes
A fixed, dependency-free /health short-circuit for simple liveness probes, with suppression of browser favicon requests caused by that probe.
✨ At a glance
| Capability | What it does |
|---|---|
| UseHealthProbeFaviconAware() | Add the /health and probe-originated favicon behavior. |
| GET /health | Returns 200 OK, plain-text OK, and no-cache headers. |
| GET or HEAD /favicon.ico | Returns 204 only when the Referer path is exactly /health. |
📦 Installation
dotnet add package Eigenverft.WebLib.HealthProbes
🚀 Quick start
Add a simple liveness endpoint
using Eigenverft.WebLib.HealthProbes;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
app.UseHealthProbeFaviconAware();
// Register before middleware that the health request should bypass.
app.Run(context => context.Response.WriteAsync("application"));
Package behavior
The middleware handles only GET and HEAD for the case-insensitive /health path. GET returns 200 with the body OK; HEAD returns the same status without a body. Both responses use text/plain; charset=utf-8 and set Cache-Control: no-store, no-cache plus Pragma: no-cache. Other methods continue through the pipeline.
A GET or HEAD for /favicon.ico returns 204 only when its Referer resolves to the exact /health path; a query string is allowed. Other favicon requests continue normally. Register the middleware early when probes must bypass later filters.
This is a fixed liveness response. It does not invoke ASP.NET Core health checks or inspect application dependencies. Map a separate readiness endpoint when health status must reflect application services.
🎯 Target frameworks
Targets .NET 8 and .NET 10. A .NET 9 application can consume the compatible net8.0 asset.
🔗 Project links
📄 License
Licensed under the MIT License by Eigenverft.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial capability package extracted from Eigenverft.WebLib.Infrastructure.
- ASP.NET Core health probe middleware with favicon-aware handling for lightweight service endpoints.
- Public namespaces and behavior remain compatible with the original Infrastructure implementation.