Movatterモバイル変換


[0]ホーム

URL:


  1. 面向开发者的 Web 技术
  2. HTTP
  3. 指南
  4. 跨源资源共享(CORS)
  5. CORS 错误
  6. 原因:expected 'true' in CORS header 'Access-Control-Allow-Credentials'

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in EnglishAlways switch to English

原因:expected 'true' in CORS header 'Access-Control-Allow-Credentials'

原因

原因:expected 'true' in CORS header 'Access-Control-Allow-Credentials'

哪里出错了?

CORS 请求要求服务器允许使用凭据,但是服务器的Access-Control-Allow-Credentials 标头的值并没有设置为true

想要在客户端解决此问题,请修改代码以不请求使用凭据:

想要通过更改服务器的配置来消除此错误,请调整服务器的配置以将Access-Control-Allow-Credentials 标头的值设置为true

参见

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp