candoumbe / candoumbe/DataFilters.AspNetCore

[FEATURE] ✨ Customizable HTTP header name

Open
#3 0 comments 0 reactions 1 assignee Claimed by @candoumbe View on GitHub
enhancement :sparkles:
Dominant language
C#
Stars
3
Forks
0
Avg merge
2m
Merged PRs (30d)
3

Description

**Is your feature request related to a problem? Please describe.**
Being able to customize the HTTP header name to avoid collision or better fit with entreprise guidelines

**Describe the solution you'd like**
When adding the service to the D.I., the `DataFiltersOptions.HttpHeaderPattern` property would be used to set up the pattern for HTTP header name

```csharp
public void Configure(IServiceCollection services)
{
services.AddDataFiltersService(options =>
{
options.HttpHeaderPattern = "my-custom-pattern"; // <-- would result in handling "x-my-custom-pattern-include" and "x-my-custom-pattern-exclude"

// Additional setup

options.Validate();
}
}
```
`options.Validate()` would throw a `InvalidDataFilterOptionsException` if the `HttpHeaderPattern` is incorrect (`null`, `string.Empty`, ... )

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.