久久久久久久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>
                          • 主站蜘蛛池模板: 亚洲精品欧美一区二区三区 | 国产亚洲精品精品国产亚洲综合 | 亚洲视频欧美视频 | 国产精品亚洲成在人线 | 久久999| 国产日韩精品视频 | 久久精品一区 | 久久一区二区三区四区 | 中文成人在线 | 日韩精品在线免费观看视频 | 日本亚洲精品成人欧美一区 | 超碰婷婷| 中文字幕欧美日韩一区 | 色婷婷久久综合 | 国产一区不卡 | 亚洲成人av在线播放 | 亚洲毛片网站 | 亚洲一本 | 中文字幕日韩在线 | 91精品国产91久久久久久三级 | 日韩精品一区二区三区第95 | 欧美日韩久 | 国产精品美女一区二区 | 亚洲视频免费观看 | 国产片侵犯亲女视频播放 | 久久精品亚洲 | 欧美亚洲视频 | 欧洲亚洲精品久久久久 | 成人在线a | 国产精品毛片无码 | 国产精品免费一区二区三区 | 久久久精品一区 | 免费观看毛片 | 91精品国产一区二区三区香蕉 | 在线免费观看毛片 | 成人免费一区二区三区牛牛 | 日韩视频精品在线 | 男女视频在线观看免费 | 亚洲精品久久久一区二区三区 | 免费黄色的视频 | 久久99精品视频 |