Branding.AspNetCore
1.0.2
dotnet add package Branding.AspNetCore --version 1.0.2
NuGet\Install-Package Branding.AspNetCore -Version 1.0.2
<PackageReference Include="Branding.AspNetCore" Version="1.0.2" />
<PackageVersion Include="Branding.AspNetCore" Version="1.0.2" />
<PackageReference Include="Branding.AspNetCore" />
paket add Branding.AspNetCore --version 1.0.2
#r "nuget: Branding.AspNetCore, 1.0.2"
#:package Branding.AspNetCore@1.0.2
#addin nuget:?package=Branding.AspNetCore&version=1.0.2
#tool nuget:?package=Branding.AspNetCore&version=1.0.2
Branding.AspNetCore
Portfolio-wide attribution middleware for ASP.NET Core services. One package, three surfaces:
- HTTP response header —
X-Built-By: dloizides.comon every response. - Swagger UI footer — discreet "built by dloizides.com" link at the bottom of the API docs page.
- Health-check payload —
builtByfield included in/health/*responses.
Purpose: every service Demetris ships carries the same operator attribution without per-service boilerplate. White-label opt-out via BrandingOptions.Disable* flags.
Installation
dotnet add package Branding.AspNetCore
Quick Start
using Branding.AspNetCore.Extensions;
var builder = WebApplication.CreateBuilder(args);
builder.AddBranding();
var app = builder.Build();
app.UseBuiltByHeader(); // place early so every response carries X-Built-By
// Swagger UI (optional, only if the service exposes Swagger UI)
var brandingOptions = app.Services.GetBrandingOptions();
app.UseSwaggerUI(o =>
{
o.HeadContent += SwaggerBrandingExtensions.BuildHeadSnippet(brandingOptions);
});
app.Run();
Configuration
appsettings.json:
{
"Branding": {
"BuiltBy": "dloizides.com",
"BuiltByUrl": "https://dloizides.com",
"HeaderName": "X-Built-By",
"DisableHeader": false,
"DisableSwaggerFooter": false,
"DisableHealthCheckField": false
}
}
All fields are optional — the defaults above are baked in.
Code-level overrides
builder.AddBranding(opts =>
{
opts.DisableSwaggerFooter = true; // white-label this service's API docs
});
Health-check payload
Branding.AspNetCore exposes a small DTO (BrandingHealthCheckPayload) you wrap your existing health-check object with in your own ResponseWriter. This avoids forcing every service to re-implement health-check JSON shaping. See ServiceDefaults.HealthChecks for an example writer.
Why this exists
Decided in the Questioner/OnlineMenu product split (2026-05-01). Every product Demetris ships needs to display a discreet "built by dloizides.com" attribution to act as a portfolio-wide credibility signal and traffic loop, without leaking sibling products. This package is the backend half; the frontend half is @dloizides/ui-primitives's <PoweredByFooter />.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.