Show / Hide Table of Contents

Class CorsExtensions

Adds some extension methods related to the Cors functionality.

Inheritance
System.Object
CorsExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Celerik.NetCore.Web
Assembly: cs.temp.dll.dll
Syntax
public static class CorsExtensions

Methods

GetCorsConfig(IConfiguration)

Gets the CORS configuration stored into the passed-in IConfiguration object.

By convention, CORS configuration properties are get from the IConfiguration object in the following way:

  • Policy: Cors:PolicyName
  • Origins: Cors:Origins
Declaration
public static CorsConfig GetCorsConfig(this IConfiguration config)
Parameters
Type Name Description
IConfiguration config

The configuration object where we get the CORS configuration.

Returns
Type Description
CorsConfig

CORS configuration stored into the passed-in IConfiguration object.

In This Article
Back to top Generated by DocFX