久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

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

  • <tfoot id='YYj05'></tfoot>

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

        Access-Control-Allow-Origin 不允許來源 http://localhost

        Origin http://localhost is not allowed by Access-Control-Allow-Origin(Access-Control-Allow-Origin 不允許來源 http://localhost)

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

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

              <tbody id='lbF4H'></tbody>

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

              • <bdo id='lbF4H'></bdo><ul id='lbF4H'></ul>
                  本文介紹了Access-Control-Allow-Origin 不允許來源 http://localhost的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在嘗試從backbone.js 獲取到我的node.js 服務器.但是,我在控制臺中收到以下錯誤:

                  I'm trying to do a fetch from backbone.js to my node.js server. However, I get the following error in the console:

                  Access-Control-Allow-Origin 不允許訪問源 http://localhost.

                  我將以下內容添加到我的 node.js 服務器:

                  I added the following to my node.js server:

                  var allowCrossDomain = function(req, res, next) {
                      res.header('Access-Control-Allow-Origin', "http://localhost");
                      res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE');
                      res.header('Access-Control-Allow-Headers', 'Content-Type');
                  };
                  
                  app.configure(function() {
                      app.use(allowCrossDomain);
                  });
                  

                  但它仍然返回相同的錯誤.但是,即使這確實有效,它似乎也不是理想的解決方案,因為我希望來自世界各地的用戶都能夠發送請求.

                  But it's still returning the same error. However, even if this did work, it doesn't seem like the ideal solution, as I would like users from all over to be able to send requests.

                  推薦答案

                  如果你希望每個人都能訪問 Node 應用,那么嘗試使用

                  If you want everyone to be able to access the Node app, then try using

                  res.header('Access-Control-Allow-Origin', "*")
                  

                  這將允許來自任何來源的請求.CORS enable 站點有很多關于不同的 Access-Control-Allow 標頭以及如何使用它們的信息.

                  That will allow requests from any origin. The CORS enable site has a lot of information on the different Access-Control-Allow headers and how to use them.

                  我使用的是 Chrome,請查看 this 關于 localhost 和 Access-Control-Allow-Origin 的錯誤錯誤.還有另一個 StackOverflow 問題詳細說明了這個問題.

                  I you are using Chrome, please look at this bug bug regarding localhost and Access-Control-Allow-Origin. There is another StackOverflow question here that details the issue.

                  這篇關于Access-Control-Allow-Origin 不允許來源 http://localhost的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                  JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發技術分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)
                  Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)
                    • <tfoot id='YF7uy'></tfoot><legend id='YF7uy'><style id='YF7uy'><dir id='YF7uy'><q id='YF7uy'></q></dir></style></legend>
                        <tbody id='YF7uy'></tbody>

                          • <bdo id='YF7uy'></bdo><ul id='YF7uy'></ul>
                          • <small id='YF7uy'></small><noframes id='YF7uy'>

                            <i id='YF7uy'><tr id='YF7uy'><dt id='YF7uy'><q id='YF7uy'><span id='YF7uy'><b id='YF7uy'><form id='YF7uy'><ins id='YF7uy'></ins><ul id='YF7uy'></ul><sub id='YF7uy'></sub></form><legend id='YF7uy'></legend><bdo id='YF7uy'><pre id='YF7uy'><center id='YF7uy'></center></pre></bdo></b><th id='YF7uy'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='YF7uy'><tfoot id='YF7uy'></tfoot><dl id='YF7uy'><fieldset id='YF7uy'></fieldset></dl></div>
                          • 主站蜘蛛池模板: a级毛片基地 | 北条麻妃国产九九九精品小说 | 在线免费观看视频黄 | 亚洲一区 中文字幕 | 国产精品美女久久久久久久久久久 | 自拍偷拍小视频 | 国产视频在线一区二区 | 欧美高清免费 | 国产欧美二区 | www国产成人免费观看视频,深夜成人网 | 久久国产精品一区 | 高清一区二区三区 | 欧美激情一区二区三区 | 91在线导航 | 亚洲高清在线免费观看 | 亚洲一区二区三区四区五区中文 | 久久福利电影 | 欧美久久久久久 | 一区二区三区在线免费观看 | 免费在线观看一区二区三区 | 粉嫩一区二区三区性色av | 日日操天天射 | 精品综合久久 | 免费在线观看一区二区三区 | 中文字幕在线一区二区三区 | 日韩一区二区三区在线看 | 欧美成人精品二区三区99精品 | 精品国产乱码久久久久久丨区2区 | 欧美成人激情 | 亚洲欧洲日韩精品 中文字幕 | 一区二区三区在线播放 | 91精品国产99 | 精品国产99| 日韩三级电影在线看 | 国产成人福利视频在线观看 | 欧美精品在欧美一区二区少妇 | 一区二区在线 | 不卡一二三区 | 伊人精品在线视频 | va精品 | 范冰冰一级做a爰片久久毛片 |