SodaPop.ConfigExplorer 1.0.0

Middleware for AspNet Core to diagnose what values are available from Configuration

There is a newer version of this package available.
See the version list below for details.
Install-Package SodaPop.ConfigExplorer -Version 1.0.0
dotnet add package SodaPop.ConfigExplorer --version 1.0.0
<PackageReference Include="SodaPop.ConfigExplorer" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SodaPop.ConfigExplorer --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Config Explorer for ASPNET Core

| Platform | Status|
|---------|-------|
|Windows | Build status |
|Linux | Build Status |

Version
license

Install

Nuget

Install-Package SodaPop.ConfigExplorer

dotnet CLI

dotnet add package SodaPop.ConfigExplorer

Configuration


if (env.IsDevelopment)
{
    //config is the `IConfigurationRoot` from your `ConfigurationBuilder`
    app.UseConfigExplorer(config);
}

Once configured, access a diagnostic listing of all the available keys and values in the configuration system via:

http://localhost:port/config

A Strong Warning On Security

Configuration can often contain application secrets such as connection strings. As a precautionary measure the end point will only load if the host is localhost and we will also filter out any configuration key which has a name containing ConnectionString. Even with these set, we strongly advise this middleware is only added in development environments.

Example

Example

Whats It Do?

The configuration system in AspNet Core is extremely flexible, but it sometimes can be hard to know what value you're going to receive. An example configuration might look like:

var config = new ConfigurationBuilder()
    .AddJsonFile("appsettings.json")
    .AddJsonFile($"appsettings.{env.EnvironmentName}.json")
    .AddJsonFile("someotherappsetting.json", optional: true) 
    .AddInMemoryCollection()
    .AddEnvironmentVariables()
    .Add(MyCustomSource)
    .Build();

Depending on where you're running, what environment variables are set on the current machine, which configuration options you're using, what order the configuration items are added, which files are present or not present can result in you getting different configuration.

Compounding this, there are a number of "magic" prefixes used to hook in for Azure integration.

This tool will simply list out all the keys and values currently available in the entire configuration system.

Available Options

app.UseConfigExplorer(config, new ConfigExplorerOptions //optional
{
    LocalHostOnly = true, //default
    PathMatch = "/config", //default
    TryRedactConnectionStrings = true //default
});

Config Explorer for ASPNET Core

| Platform | Status|
|---------|-------|
|Windows | Build status |
|Linux | Build Status |

Version
license

Install

Nuget

Install-Package SodaPop.ConfigExplorer

dotnet CLI

dotnet add package SodaPop.ConfigExplorer

Configuration


if (env.IsDevelopment)
{
    //config is the `IConfigurationRoot` from your `ConfigurationBuilder`
    app.UseConfigExplorer(config);
}

Once configured, access a diagnostic listing of all the available keys and values in the configuration system via:

http://localhost:port/config

A Strong Warning On Security

Configuration can often contain application secrets such as connection strings. As a precautionary measure the end point will only load if the host is localhost and we will also filter out any configuration key which has a name containing ConnectionString. Even with these set, we strongly advise this middleware is only added in development environments.

Example

Example

Whats It Do?

The configuration system in AspNet Core is extremely flexible, but it sometimes can be hard to know what value you're going to receive. An example configuration might look like:

var config = new ConfigurationBuilder()
    .AddJsonFile("appsettings.json")
    .AddJsonFile($"appsettings.{env.EnvironmentName}.json")
    .AddJsonFile("someotherappsetting.json", optional: true) 
    .AddInMemoryCollection()
    .AddEnvironmentVariables()
    .Add(MyCustomSource)
    .Build();

Depending on where you're running, what environment variables are set on the current machine, which configuration options you're using, what order the configuration items are added, which files are present or not present can result in you getting different configuration.

Compounding this, there are a number of "magic" prefixes used to hook in for Azure integration.

This tool will simply list out all the keys and values currently available in the entire configuration system.

Available Options

app.UseConfigExplorer(config, new ConfigExplorerOptions //optional
{
    LocalHostOnly = true, //default
    PathMatch = "/config", //default
    TryRedactConnectionStrings = true //default
});

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.0.0 407 5/26/2019
1.0.0 854 5/21/2017
0.2.0 302 3/27/2017