@Target(value={TYPE,METHOD}) @Retention(value=RUNTIME) @Documented public @interface Cors
| 限定符和类型 | 可选元素和说明 |
|---|---|
char |
allowCredentials
当浏览器的 credentials 设置为 true 时是否允许浏览器读取 response 的内容
|
String[] |
allowedHeaders
实际请求中允许携带的首部字段
|
com.buession.web.http.HttpMethod[] |
allowedMethods
允许请求的方法
|
String[] |
exposedHeaders
允许浏览器访问的头
|
long |
maxAge
指定了 preflight 请求的结果能够被缓存时间(单位:秒)
|
String[] |
origins
允许请求的域,如果值为 '$http_origin' 则设置为请求头
HttpHeader.ORIGIN 的值,
value() 的别名 |
String[] |
value
允许请求的域,如果值为 '$http_origin' 则设置为请求头
HttpHeader.ORIGIN 的值,
origins() 的别名 |
public abstract com.buession.web.http.HttpMethod[] allowedMethods
public abstract String[] allowedHeaders
public abstract String[] exposedHeaders
Copyright © 2022 buession.com Inc.. All rights reserved.