Dela via


CorsPolicyBuilder.SetPreflightMaxAge(TimeSpan) Method

Definition

Sets the preflightMaxAge for the underlying policy.

public:
 Microsoft::AspNetCore::Cors::Infrastructure::CorsPolicyBuilder ^ SetPreflightMaxAge(TimeSpan preflightMaxAge);
public Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder SetPreflightMaxAge (TimeSpan preflightMaxAge);
member this.SetPreflightMaxAge : TimeSpan -> Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicyBuilder
Public Function SetPreflightMaxAge (preflightMaxAge As TimeSpan) As CorsPolicyBuilder

Parameters

preflightMaxAge
TimeSpan

A positive TimeSpan indicating the time a preflight request can be cached.

Returns

The current policy builder.

Applies to