Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nikiforovall/configurationdebugviewendpoint
Add endpoint-enabled middleware by using IEndpointRouteBuilder extension method. https://nikiforovall.github.io/dotnet/aspnetcore/2021/03/23/endpoint-route-builder-extension-pattern.html
https://github.com/nikiforovall/configurationdebugviewendpoint
asp-net-core configuration debugview
Last synced: about 2 months ago
JSON representation
Add endpoint-enabled middleware by using IEndpointRouteBuilder extension method. https://nikiforovall.github.io/dotnet/aspnetcore/2021/03/23/endpoint-route-builder-extension-pattern.html
- Host: GitHub
- URL: https://github.com/nikiforovall/configurationdebugviewendpoint
- Owner: NikiforovAll
- License: mit
- Created: 2021-03-23T14:38:05.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-24T13:34:18.000Z (almost 4 years ago)
- Last Synced: 2024-12-13T03:42:03.494Z (about 2 months ago)
- Topics: asp-net-core, configuration, debugview
- Language: C#
- Homepage: https://www.nuget.org/packages/ConfigurationDebugViewEndpoint/
- Size: 30.3 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# NikiforovAll.ConfigurationDebugViewEndpoint
[![GitHub Actions Status](https://github.com/NikiforovAll/ConfigurationDebugViewEndpoint/workflows/Build/badge.svg?branch=main)](https://github.com/NikiforovAll/ConfigurationDebugViewEndpoint/actions)
[![GitHub Actions Build History](https://buildstats.info/github/chart/nikiforovall/ConfigurationDebugViewEndpoint?branch=main&includeBuildsFromPullRequest=false)](https://github.com/NikiforovAll/ConfigurationDebugViewEndpoint/actions)
A convenient extension method(s) for IEndpointRouteBuilder to add configuration debug view.
The goal of this project is to provide a convenient way of adding something like this to a project:
Before:
```csharp
app.UseEndpoints(endpoints =>
{
endpoints.MapGet("/config", async context =>
{
var config = (Configuration as IConfigurationRoot).GetDebugView();
await context.Response.WriteAsync(config);
});
});
```After:
```csharp
app.UseEndpoints(endpoints =>
{
endpoints.MapConfigurationDebugView("/config", (options) => options.AllowDevelopmentOnly = true);
});
```For more examples, please see: [tests](https://github.com/NikiforovAll/ConfigurationDebugViewEndpoint/tree/main/Tests)