Click or drag to resize
CORSRule Class
表示一条CORS规则。
Inheritance Hierarchy
SystemObject
  Aliyun.OSSCORSRule

Namespace: Aliyun.OSS
Assembly: Aliyun.OSS (in Aliyun.OSS.dll) Version: 2.5.1.0 (2.5.1)
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
添加一条AllowedHeader。
Public methodAddAllowedMethod
添加一条AllowedMethod。
Public methodAddAllowedOrigin
添加一条AllowedOrigin。
Public methodAddExposeHeader
添加一条ExposeHeader。
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
控制在 OPTIONS 预取指令中 Access-Control-Request-Headers 头中指定的 header 是否允许。在 Access-Control-Request-Headers 中指定的每个 header 都必须在 AllowedHeader 中有一条对应的项。允许使用最多一个*通配符。
Public propertyAllowedMethods
指定允许的跨域请求方法(GET,PUT,DELETE,POST,HEAD)。
Public propertyAllowedOrigins
指定允许的跨域请求的来源,允许使用多个元素来指定多个允许的来源。 允许使用最多一个*通配符。如果指定为“ *”则表示允许所有的来源的跨域请求。
Public propertyExposeHeaders
指定允许用户从应用程序中访问的响应头(例如一个 Javascript 的 XMLHttpRequest 对象。不允许使用 *通配符。
Public propertyMaxAgeSeconds
指定浏览器对特定资源的预取( OPTIONS)请求返回结果的缓存时间,单位为秒, 最大值不超过999999999,且一个 CORSRule 里面最多允许出现一个。
Top
See Also