public static class CORSConfiguration.CORSRule
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
java.util.List<java.lang.String> |
allowedHeader
在发送 OPTIONS 请求时告知服务端,接下来的请求可以使用哪些自定义的 HTTP 请求头部,支持通配符*
|
java.util.List<java.lang.String> |
allowedMethod
允许的 HTTP 操作,枚举值:GET,PUT,HEAD,POST,DELETE
|
java.lang.String |
allowedOrigin
允许的访问来源,支持通配符*
格式为:协议://域名[:端口],例如:http://www.qq.com
|
java.util.List<java.lang.String> |
exposeHeader
设置浏览器可以接收到的来自服务器端的自定义头部信息
|
java.lang.String |
id
配置规则的 ID,是否包含该字段取决于 PUT Bucket cors 时是否指定 ID 字段
|
int |
maxAgeSeconds
设置 OPTIONS 请求得到结果的有效期
|
构造器和说明 |
---|
CORSRule() |
public java.lang.String id
public java.lang.String allowedOrigin
public java.util.List<java.lang.String> allowedMethod
public java.util.List<java.lang.String> allowedHeader
public java.util.List<java.lang.String> exposeHeader
public int maxAgeSeconds
public java.lang.String toString()
java.lang.Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString
在类中 java.lang.Object