猿问

js请求头跨域问题

No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. The response had HTTP status code 400.

response.setHeader("Access-Control-Allow-Origin", "*"); 
response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); 
response.setHeader("Access-Control-Max-Age", "3600"); 
response.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");

所有设置为*号也是不行


神不在的星期二
浏览 1106回答 1
1回答

慕森卡

请参考:不要再问我跨域的问题了
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答