[API Proposal]: Add `CorsPolicyBuilder.AllowAnyExposedHeader`
Open
api-suggestion
area-middleware
feature-cors
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
## Background and Motivation
The header Access-Control-Expose-Headers supports wildcard as with other cors headers.
## Proposed API
```cs
namespace Microsoft.AspNetCore.Cors.Infrastructure;
public class CorsPolicyBuilder
{
+ public CorsPolicyBuilder AllowAnyExposedHeader();
}
```
## Usage Examples
```cs
policyBuilder.AllowAnyExposedHeader();
```
## Alternative Designs
## Risks
Just like `AnyOrigins` this is not gonna work with `AllowCredentials`. Perhaps an analyzer could flag misusage for both.
Contributor guide
Assessment
This issue has not been assessed yet.