簡體   English   中英

ionic:請求的資源上不存在“ Access-Control-Allow-Origin”標頭

[英]ionic: No 'Access-Control-Allow-Origin' header is present on the requested resource

這是我的ionic.project,允許在研究后找到跨源請求

{
  "name": "AppName",
  "app_id": "",
  "proxies": [
    {
      "path": "/path",
      "proxyUrl": "http://www.url.com/path"
    }
  ]
}

當我在cmd終端上運行ionic serve時,它會啟動瀏覽器,並在控制台上顯示

XMLHttpRequest cannot load http://www.url.com/Token. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access.

有什么事嗎

對我而言,我使用此插件來操作Content-Security-Policy:

科爾多瓦-插件白名單

這對我有幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM