第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

缺少CORS標(biāo)頭“ Access-Control-Allow-Origin”

缺少CORS標(biāo)頭“ Access-Control-Allow-Origin”

UYOU 2019-10-21 10:02:39
我從我的asp.net表單調(diào)用此函數(shù),并在調(diào)用ajax時在Firebug控制臺上收到以下錯誤。跨域請求被阻止:同源策略禁止讀取位于http://anotherdomain/test.json的遠(yuǎn)程資源。(原因:CORS標(biāo)頭“ Access-Control-Allow-Origin”缺失)。var url= 'http://anotherdomain/test.json';        $.ajax({            url: url,            crossOrigin: true,            type: 'GET',            xhrFields: { withCredentials: true },            accept: 'application/json'        }).done(function (data) {            alert(data);                        }).fail(function (xhr, textStatus, error) {            var title, message;            switch (xhr.status) {                case 403:                    title = xhr.responseJSON.errorSummary;                    message = 'Please login to your server before running the test.';                    break;                default:                    title = 'Invalid URL or Cross-Origin Request Blocked';                    message = 'You must explictly add this site (' + window.location.origin + ') to the list of allowed websites in your server.';                    break;            }        });我已經(jīng)做了另一種方法,但仍然找不到解決方案。注意:我沒有更改服務(wù)器端(API / URL)的服務(wù)器權(quán)限。
查看完整描述

3 回答

  • 3 回答
  • 0 關(guān)注
  • 1121 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號