<i id='ToFeO'><tr id='ToFeO'><dt id='ToFeO'><q id='ToFeO'><span id='ToFeO'><b id='ToFeO'><form id='ToFeO'><ins id='ToFeO'></ins><ul id='ToFeO'></ul><sub id='ToFeO'></sub></form><legend id='ToFeO'></legend><bdo id='ToFeO'><pre id='ToFeO'><center id='ToFeO'></center></pre></bdo></b><th id='ToFeO'></th></span></q></dt></tr></i><div id='ToFeO'><tfoot id='ToFeO'></tfoot><dl id='ToFeO'><fieldset id='ToFeO'></fieldset></dl></div>

      <small id='ToFeO'></small><noframes id='ToFeO'>

      <tfoot id='ToFeO'></tfoot>
        <bdo id='ToFeO'></bdo><ul id='ToFeO'></ul>
      1. <legend id='ToFeO'><style id='ToFeO'><dir id='ToFeO'><q id='ToFeO'></q></dir></style></legend>

        Google Chrome:当凭证标志为真时,不能在“Access-C

        时间:2023-10-13
          <tbody id='VKvOI'></tbody>

          1. <i id='VKvOI'><tr id='VKvOI'><dt id='VKvOI'><q id='VKvOI'><span id='VKvOI'><b id='VKvOI'><form id='VKvOI'><ins id='VKvOI'></ins><ul id='VKvOI'></ul><sub id='VKvOI'></sub></form><legend id='VKvOI'></legend><bdo id='VKvOI'><pre id='VKvOI'><center id='VKvOI'></center></pre></bdo></b><th id='VKvOI'></th></span></q></dt></tr></i><div id='VKvOI'><tfoot id='VKvOI'></tfoot><dl id='VKvOI'><fieldset id='VKvOI'></fieldset></dl></div>
              <bdo id='VKvOI'></bdo><ul id='VKvOI'></ul>
              1. <tfoot id='VKvOI'></tfoot>

                • <small id='VKvOI'></small><noframes id='VKvOI'>

                  <legend id='VKvOI'><style id='VKvOI'><dir id='VKvOI'><q id='VKvOI'></q></dir></style></legend>
                  本文介绍了Google Chrome:当凭证标志为真时,不能在“Access-Control-Allow-Origin"标头中使用通配符“*"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我知道这很常见,对于早期版本的 chrome,我曾经设置C:Program Files (x86)GoogleChromeApplicationchrome.exe" --args --disable-web-security--user-data-dir 在 chrome 快捷方式选项卡中避免访问控制允许来源"错误.使用最新版本,此修复似乎不再有效.安装最新版本 53.0.2785.89 m 后控制台报错

                  XMLHttpRequest 无法加载 https://example.org:15003/apps/services/preview/rr/common/1.0/default/index.html.对预检请求的响应未通过访问控制检查:当凭证标志为真时,不能在Access-Control-Allow-Origin"标头中使用通配符*".因此,不允许访问 Origin 'http://ibm-pb7en65:10080'.XMLHttpRequest 的凭据模式由 withCredentials 属性控制.

                  我不确定要添加哪些附加属性以避免Access-Control-Allow-Origin"错误.有什么方法可以实现吗?

                  解决方案

                  错误告诉你服务器发回了这个响应头:

                  <上一页>访问控制允许来源:*

                  ...在凭据请求上.那是行不通的.对于带有凭据的请求,服务器必须返回 specific Access-Control-Allow-Origin 标头.

                  由于您是从 http://ibm-pb7en65:10080/ 发出请求,因此您的服务器必须发回此标头:

                  <上一页>访问控制允许来源:http://ibm-pb7en65:10080

                  不能使用通配符*代替.

                  解决办法是:

                  • 更新服务器以执行此操作,或
                  • 从请求中删除凭据

                  详细信息,一如既往,在规范中.

                  I know this is something usual, With the earlier versions of chrome I used to set "C:Program Files (x86)GoogleChromeApplicationchrome.exe" --args --disable-web-security --user-data-dir in chrome shortcut tab to avoid 'Access-Control-Allow-Origin' errors. With the latest version, it seems like this fix is not working anymore. After installing the latest version 53.0.2785.89 m this is the error in console

                  XMLHttpRequest cannot load https://example.org:15003/apps/services/preview/rr/common/1.0/default/index.html. Response to preflight request doesn't pass access control check: A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'http://ibm-pb7en65:10080' is therefore not allowed access. The credentials mode of an XMLHttpRequest is controlled by the withCredentials attribute.

                  I am not sure which additional attributes are to be added to avoid 'Access-Control-Allow-Origin' error.Is there any way this can be achieved?

                  解决方案

                  The error is telling you that the server sent back this response header:

                  Access-Control-Allow-Origin: *
                  

                  ...on a credentialed request. That doesn't work. On a request with credentials, the server must return a specific Access-Control-Allow-Origin header.

                  Since you're making the request from http://ibm-pb7en65:10080/, your server must send back this header:

                  Access-Control-Allow-Origin: http://ibm-pb7en65:10080
                  

                  It cannot use the wildcard * instead.

                  The solution is either:

                  • Update the server to do that, or
                  • Remove credentials from the request

                  Details, as always, in the specification.

                  这篇关于Google Chrome:当凭证标志为真时,不能在“Access-Control-Allow-Origin"标头中使用通配符“*"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:具有完成阶段的多个 ajax 请求的进度条.是否可以 下一篇:如何监控图像源的满载状态

                  相关文章

                  最新文章

                  1. <legend id='hWfTO'><style id='hWfTO'><dir id='hWfTO'><q id='hWfTO'></q></dir></style></legend>
                    1. <i id='hWfTO'><tr id='hWfTO'><dt id='hWfTO'><q id='hWfTO'><span id='hWfTO'><b id='hWfTO'><form id='hWfTO'><ins id='hWfTO'></ins><ul id='hWfTO'></ul><sub id='hWfTO'></sub></form><legend id='hWfTO'></legend><bdo id='hWfTO'><pre id='hWfTO'><center id='hWfTO'></center></pre></bdo></b><th id='hWfTO'></th></span></q></dt></tr></i><div id='hWfTO'><tfoot id='hWfTO'></tfoot><dl id='hWfTO'><fieldset id='hWfTO'></fieldset></dl></div>

                      <small id='hWfTO'></small><noframes id='hWfTO'>

                      <tfoot id='hWfTO'></tfoot>
                      • <bdo id='hWfTO'></bdo><ul id='hWfTO'></ul>