Click or drag to resize
CORSRule Class
Defining a cross origin resource sharing rule
Inheritance Hierarchy
SystemObject
  Aliyun.OSSCORSRule

Namespace: Aliyun.OSS
Assembly: Aliyun.OSS (in Aliyun.OSS.dll) Version: 2.8.0.0 (2.8.0)
Syntax
public class CORSRule

The CORSRule type exposes the following members.

Constructors
  NameDescription
Public methodCORSRule
Initializes a new instance of the CORSRule class
Top
Methods
  NameDescription
Public methodAddAllowedHeader
Adds a allowed header.
Public methodAddAllowedMethod
Adds one allowed HTTP method
Public methodAddAllowedOrigin
Adds one allowed origin.
Public methodAddExposeHeader
adds an expose header.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyAllowedHeaders
Get or set Allowed Headers. This property is to specify the value of Access-Control-Allowed-Headers in the preflight response. It defines the allowed headers in the actual CORS request. Each allowed header can have up to one wildcard (*).
Public propertyAllowedMethods
Allowed HTTP Method. Valid values are GET,PUT,DELETE,POST,HEAD. This property is to specify the value of Access-Control-Allow-Methods header in the preflight response. It means the allowed methods in the actual CORS request.
Public propertyAllowedOrigins
Allowed origins. One origin could contain at most one wildcard (*).
Public propertyExposeHeaders
Get or set exposed headers in the CORS response. Wildcard(*) is not allowed. This property is to specify the value of Access-Control-Expose-Headers in the preflight response.
Public propertyMaxAgeSeconds
HTTP Access-Control-Max-Age's getter and setter, in seconds. The Access-Control-Max-Age header indicates how long the results of a preflight request (OPTIONS) can be cached in a preflight result cache. The max value is 999999999.
Top
See Also