nebulasio / wiki

This repository is out of date, please check the new wiki:
http://wiki.nebulas.io/en/latest/
GNU General Public License v3.0
421 stars 153 forks source link

vue项目访问测试库出错 #145

Closed zeroGaozj closed 6 years ago

zeroGaozj commented 6 years ago

在web钱包中测试合约逻辑正确后开始写入vue前端网页中,访问时报错

Failed to load https://testnet.nebulas.io/v1/user/call: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. Origin 'http://localhost:8080' is therefore not allowed access. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

重新创建一个新的html文件,写入同样的js可以正常访问并获得返回数据 请问是什么原因?

act262 commented 6 years ago

跨域问题