0
点赞
收藏
分享

微信扫一扫

Access to XMLHttpRequest at ‘http://localhost:8082/sockjs-node/info?t=1610442684722‘ from origin ‘ht

背景:

当运行一个Vue项目时,出现该报错信息

Access to XMLHttpRequest at ‘http://localhost:8082/sockjs-node/info?t=1610442684722‘ from origin ‘ht_端口号

解决办法:

该报错信息主要是跨域的问题,通过仔细分析该错误,发现是端口号不一致导致的,那么只需打开项目根目录下的 vue.config.js 文件,然后将该项目的 8082 端口号修改为另一个即可,例如:8182 ,如下图:

Access to XMLHttpRequest at ‘http://localhost:8082/sockjs-node/info?t=1610442684722‘ from origin ‘ht_报错信息_02

然后在重新运行该Vue项目即可

Access to XMLHttpRequest at ‘http://localhost:8082/sockjs-node/info?t=1610442684722‘ from origin ‘ht_跨域_03

 

 


举报

相关推荐

0 条评论