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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

關(guān)于CORS跨域問(wèn)題?

關(guān)于CORS跨域問(wèn)題?

慕勒3428872 2019-03-06 13:15:46
過(guò)濾器中已經(jīng)設(shè)置了        httpServletResponse.setHeader("Access-Control-Allow-Origin", httpServletRequest.getHeader("Origin"));        httpServletResponse.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE, OPTIONS");        httpServletResponse.setHeader("Access-Control-Max-Age", "0");        httpServletResponse.setHeader("Access-Control-Allow-Headers", "Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With,userId,token, Access-Control-Allow-Origin");        httpServletResponse.setHeader("Access-Control-Allow-Credentials", "true");        httpServletResponse.setHeader("XDomainRequestAllowed", "1");前端請(qǐng)求也加上了參數(shù)            xhrFields: {                withCredentials: true            },            crossDomain: true,返回結(jié)果也是200, 但是chrome報(bào)錯(cuò)了錯(cuò)誤The 'Access-Control-Allow-Origin' header has a value 'null' that is not equal to the supplied origin. Origin 'null' is therefore not allowed access.
查看完整描述

3 回答

?
達(dá)令說(shuō)

TA貢獻(xiàn)1821條經(jīng)驗(yàn) 獲得超6個(gè)贊

這個(gè)不是你單方面設(shè)置就有用的,還需要后端的小伙伴幫忙確認(rèn)一下他們的設(shè)置。


查看完整回答
反對(duì) 回復(fù) 2019-03-21
?
一只萌萌小番薯

TA貢獻(xiàn)1795條經(jīng)驗(yàn) 獲得超7個(gè)贊

本地localhost的origin是null,你可以設(shè)置為*或特定的域名試試


查看完整回答
反對(duì) 回復(fù) 2019-03-21
  • 3 回答
  • 0 關(guān)注
  • 588 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

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

公眾號(hào)

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