账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    vue+webpack+axios跨域请求,No 'Access-Control-Allow-Origin' header'?
    32
    0

    用vue-cli搭建的vue项目,axios发起get请求的时候,控制台报错:
    Failed to load http://222.16.46.131:8080/Skyworth/changePictureAdmin: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. The response had HTTP status code 502.
    我要访问的http://222.16.46.131:8080/Skyworth/changePictureAdmin是别人写好的,已经部署在其他服务器的接口,后台有设置cors,请问前端vue项目需要更改什么配置文件,才能成功跨域请求?

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部