CorsPolicyBuilder.WithHeaders(String[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds the specified headers
to the policy.
public:
Microsoft::AspNetCore::Cors::Infrastructure::CorsPolicyBuilder ^ WithHeaders(... cli::array <System::String ^> ^ headers);
public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder WithHeaders (params string[] headers);
member this.WithHeaders : string[] -> Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder
Public Function WithHeaders (ParamArray headers As String()) As CorsPolicyBuilder
Parameters
- headers
- String[]
The headers which need to be allowed in the request.
Returns
The current policy builder.