Method UseCors
UseCors(Action<CrossOriginResourceSharingHeaders>)
Calls an action that has an CrossOriginResourceSharingHeaders instance from the main listening host as an argument.
public HttpServerHostContextBuilder UseCors(Action<CrossOriginResourceSharingHeaders> handler)
Parameters
handler
Action<CrossOriginResourceSharingHeaders>An action where the first argument is the main CrossOriginResourceSharingHeaders object.
Returns
UseCors(CrossOriginResourceSharingHeaders)
Sets an CrossOriginResourceSharingHeaders instance in the current listening host.
public HttpServerHostContextBuilder UseCors(CrossOriginResourceSharingHeaders cors)
Parameters
cors
CrossOriginResourceSharingHeadersThe CrossOriginResourceSharingHeaders to the current host builder.