• <small id='5H9SE'></small><noframes id='5H9SE'>

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

        <legend id='5H9SE'><style id='5H9SE'><dir id='5H9SE'><q id='5H9SE'></q></dir></style></legend>

        Safari 10.1:由于访问控制检查,无法加载带有查询

        时间:2023-10-14
            • <small id='QJkXr'></small><noframes id='QJkXr'>

              <tfoot id='QJkXr'></tfoot>
              <legend id='QJkXr'><style id='QJkXr'><dir id='QJkXr'><q id='QJkXr'></q></dir></style></legend>

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

                  本文介绍了Safari 10.1:由于访问控制检查,无法加载带有查询参数的 XMLHttpRequest的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  Safari 10.1 上尝试 CORS 请求 时,在包含查询参数(例如 https://example.com/api?v=1),Safari 说

                  When trying a CORS request on Safari 10.1, on an URL which includes query parameters (e.g. https://example.com/api?v=1), Safari says

                  XMLHttpRequest 由于访问控制检查而无法加载

                  XMLHttpRequest cannot load due to access control checks

                  Chrome/Firefox 运行良好.

                  Chrome/Firefox works fine.

                  对于来自没有 ?v=1 的页面的请求,Safari 也可以正常工作.

                  On requests from the page without the ?v=1, Safari works fine too.

                  我尝试从

                  Access-Control-Allow-Origin: https://example.com
                  

                  Access-Control-Allow-Origin: https://example.com/api?v=1
                  

                  但这会破坏 Chrome.

                  but that breaks Chrome.

                  有什么建议吗?

                  推荐答案

                  如果有人遇到这个错误,它只是发生在我正在构建的应用程序中.就我而言,它原来是 uri 中的尾随/,导致 301 响应,出于某种原因,Safari 将其解释为 500 响应.

                  If anyone comes across this error, it just occurred in the application I was building. In my case, it turned out to be a trailing / in the uri, which caused a 301 response, which was for some reason interpreted by Safari as a 500 response.

                  这篇关于Safari 10.1:由于访问控制检查,无法加载带有查询参数的 XMLHttpRequest的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:使用 XMLHttpRequest 不断收到 No 'Access-Control-All 下一篇:跨域 AJAX 请求不起作用

                  相关文章

                  最新文章

                  • <bdo id='1mixE'></bdo><ul id='1mixE'></ul>
                  <tfoot id='1mixE'></tfoot>

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

                    1. <small id='1mixE'></small><noframes id='1mixE'>

                      <legend id='1mixE'><style id='1mixE'><dir id='1mixE'><q id='1mixE'></q></dir></style></legend>