Dela via


CorsPolicyBuilder.WithHeaders(String[]) Method

Definition

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.

Applies to