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

Namespace: Aliyun.OpenServices.OpenStorageService
Assembly: Aliyun.OSS (in Aliyun.OSS.dll) Version: 1.0.5492.31618
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 (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (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