-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Startup configuration options #26
base: master
Are you sure you want to change the base?
Conversation
Hi, we have to review some parts...however tests are missing. |
using Microsoft.Extensions.DependencyInjection; | ||
|
||
namespace AspNetCore.VersionInfo | ||
{ | ||
public static class VersionInfoBuilderExtensions | ||
{ | ||
public static VersionInfoBuilder With<T>(this VersionInfoBuilder builder) where T : class, IInfoProvider | ||
private static List<String> keyValues = new List<String>(); | ||
public static VersionInfoBuilder With<T>(this VersionInfoBuilder builder, Action<ExclusionSettings> configureOptions = null) where T : class, IInfoProvider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this way configureOptions is specific for the provider configuration, but all (excluded) keys of each provider are merged in a single array (static).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a better approach is using AspNet Options framework... as example you could inspect AspnetCore.Healthchecks code for it
https://github.com/dotnet/aspnetcore/tree/main/src/HealthChecks/HealthChecks/src/DependencyInjection
Hi, Thanks for review I will try to find a better approach , your comment is useful for the next PR. |
If you prefer, I create a new branch and support you in the first part (creating options, extension methods, ...) and then you integrate filter logic |
In the Startup.cs file we can use the below configuration to exclude some of sensitive contents
Example.
Result of the above configuration:
We can add all as well.
The final example is.