亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

XMLHttpRequest cannot load http://127.0.0.1:8090/api/list. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.

XMLHttpRequest cannot load http://127.0.0.1:8090/api/list. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.

正在回答

2 回答

跨域了,不過你是本地請求一般不會出現。。。有可能你電腦上訪問html頁面 使用的localhost,host文件里面沒有localhost的dns配置?

在Handler函數內第一行添加w.Header().Set("Access-Control-Allow-Origin", "*"),設置請求的域名可以為任意域名。


0 回復 有任何疑惑可以回復我~

在函數getFileListHandler中第一行添加w.Header().Set("Access-Control-Allow-Origin", "*"),就解決獲取視頻列表跨越問題了。?

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
5G時代Vlog原型系統開發
  • 參與學習       12618    人
  • 解答問題       19    個

Vlog創造了一大批“網紅”,來學Vlog系統開發,做第一批吃螃蟹的人!

進入課程

XMLHttpRequest cannot load http://127.0.0.1:8090/api/list. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號