php accesscontrolallowcredentials,Access

编程入门 行业动态 更新时间:2024-10-15 10:14:06

<a href=https://www.elefans.com/category/jswz/34/1770834.html style=php accesscontrolallowcredentials,Access"/>

php accesscontrolallowcredentials,Access

Access-Control-Allow-Credentials

Access-Control-Allow-Credentials响应报头指示的请求的响应是否可以暴露于该页面。当true值返回时它可以被暴露。

凭证是 Cookie ,授权标头或 TLS 客户端证书。

当作为对预检请求的响应的一部分使用时,它指示是否可以使用凭证进行实际请求。请注意,简单的GET请求不是预检的,所以如果请求使用凭证的资源,如果此资源不与资源一起返回,浏览器将忽略该响应,并且不会返回到 Web 内容。

Access-Control-Allow-Credentials的 header 文件与该XMLHttpRequest.withCredentials属性或者在提取 API credentials的Request()构造函数中的选项一起工作。必须在双方(Access-Control-Allow-Credentials的 header 和 XHR 或 Fetch 请求中)设置证书,以使 CORS 请求凭证成功。

Header type

Response header

Forbidden header name

no

语法

Access-Control-Allow-Credentials: true

指令

trueThe only valid value for this header is true (case-sensitive). If you don't need credentials, omit this header entirely (rather than setting its value to false).

例子

允许凭证:

Access-Control-Allow-Credentials: true</

更多推荐

php accesscontrolallowcredentials,Access

本文发布于:2024-02-24 14:11:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1695559.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:php   accesscontrolallowcredentials   Access

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!