GatewayCorsProperties interface
跨原始來源資源分享屬性
屬性
| allow |
跨網站要求是否支援用戶認證。 有效值: |
| allowed |
跨網站要求中允許的標頭。 特殊值 |
| allowed |
跨網站要求上允許的 HTTP 方法。 特殊值 |
| allowed |
允許的來源提出跨網站要求。 特殊值 |
| exposed |
要針對跨網站要求公開的 HTTP 回應標頭。 |
| max |
用戶端可以快取來自正式發行前要求之回應多久,以秒為單位。 |
屬性詳細資料
allowCredentials
跨網站要求是否支援用戶認證。 有效值:true、false。
allowCredentials?: boolean
屬性值
boolean
allowedHeaders
跨網站要求中允許的標頭。 特殊值 * 允許實際要求傳送任何標頭。
allowedHeaders?: string[]
屬性值
string[]
allowedMethods
跨網站要求上允許的 HTTP 方法。 特殊值 * 允許所有方法。 如果未設定,預設會允許 GET 和 HEAD。
allowedMethods?: string[]
屬性值
string[]
allowedOrigins
允許的來源提出跨網站要求。 特殊值 * 允許所有網域。
allowedOrigins?: string[]
屬性值
string[]
exposedHeaders
要針對跨網站要求公開的 HTTP 回應標頭。
exposedHeaders?: string[]
屬性值
string[]
maxAge
用戶端可以快取來自正式發行前要求之回應多久,以秒為單位。
maxAge?: number
屬性值
number