Class AdditionalMappings
Provides predefined groups of MIME mappings that backfill extensions missing from the target framework's ASP.NET Core static-file defaults.
Inherited Members
Namespace: Eigenverft.WebLib.Infrastructure.Hosting.StaticFiles
Assembly: Eigenverft.WebLib.Infrastructure.dll
Syntax
public static class AdditionalMappings
Properties
| Edit this page View SourceMedia
Backfills web-media mappings that differ across the supported ASP.NET Core target frameworks.
Declaration
public static StaticFileAdditionalMappings Media { get; }
Property Value
| Type | Description |
|---|---|
| StaticFileAdditionalMappings |
Remarks
On net8.0, this adds .avif as image/avif. ASP.NET Core 10 already provides that mapping,
so the group is intentionally empty on net10.0.
WebApp
Backfills static-file mappings needed by legacy PWA/Blazor hosting that are still absent from the current ASP.NET Core defaults.
Declaration
public static StaticFileAdditionalMappings WebApp { get; }
Property Value
| Type | Description |
|---|---|
| StaticFileAdditionalMappings |
Remarks
ASP.NET Core already maps .webmanifest and .wasm for the supported target frameworks, so this
group currently adds only .br and .dat as application/octet-stream.
Methods
| Edit this page View SourceCombine(params StaticFileAdditionalMappings[])
Combines multiple predefined mapping groups into one typed group.
Declaration
public static StaticFileAdditionalMappings Combine(params StaticFileAdditionalMappings[] groups)
Parameters
| Type | Name | Description |
|---|---|---|
| StaticFileAdditionalMappings[] | groups | The groups to combine. |
Returns
| Type | Description |
|---|---|
| StaticFileAdditionalMappings | A mapping group containing the union of the supplied groups. |