收藏
回答

急!第三方网页通过微信公众号授权跨域问题?


流程: 前端请求后台接口,后台重定向到https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc7290663e60b3a23&redirect_uri=http%3A%2F%2Fantare.fun%2Fweixin%2Fauth&response_type=code&scope=snsapi_userinfo&connect_redirect=1&state=STATE#wechat_redirect

之后前端会报跨域问题:

Access to XMLHttpRequest at 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc7290663e60b3a23&redirect_uri=http%3A%2F%2Fantare.fun%2Fweixin%2Fauth&response_type=code&scope=snsapi_userinfo&connect_redirect=1&state=STATE#wechat_redirect' (redirected from 'http://antare.fun/weixin/login') from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.


后端已经配置过跨域,其他接口也都能用

回调域名也在公众号中设置过了


回答关注问题邀请回答
收藏

2 个回答

  •   
      
    09-10

    楼主 , 问题解决了吗?

    09-10
    有用
    回复
  • Antares
    Antares
    06-12

    有没有人能帮我邀请一下社区运营,我等级不够

    06-12
    有用
    回复 1
    • 灼心
      灼心
      07-08
      问题解决了吗
      07-08
      回复
登录 后发表内容
问题标签