C# Class AngularAzureSearch.WebAPI.Cors.MyCustomCorsPolicyProvider

Inheritance: ICorsPolicyProvider
Mostra file Open project: TheDarkCode/AngularAzureSearch

Public Methods

Method Description
GetCorsPolicyAsync ( HttpRequestMessage request, CancellationToken cancellationToken ) : Task

Returns custom CorsPolicy with AllowAnyHeader and AllowAnyMethod set to true by default. Allowed origins are imported from config via helper then split into an array and added to the CorsPolicy.Origins variable of type "IList string".

Method Details

GetCorsPolicyAsync() public method

Returns custom CorsPolicy with AllowAnyHeader and AllowAnyMethod set to true by default. Allowed origins are imported from config via helper then split into an array and added to the CorsPolicy.Origins variable of type "IList string".
public GetCorsPolicyAsync ( HttpRequestMessage request, CancellationToken cancellationToken ) : Task
request System.Net.Http.HttpRequestMessage
cancellationToken System.Threading.CancellationToken
return Task