Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用后台转发 XMLHttpRequest 请求,无需配置 CORS #8

Closed
keyding opened this issue Oct 17, 2016 · 5 comments
Closed

使用后台转发 XMLHttpRequest 请求,无需配置 CORS #8

keyding opened this issue Oct 17, 2016 · 5 comments
Assignees

Comments

@keyding
Copy link

keyding commented Oct 17, 2016

  • wept --0.2.3:
  • node --6.0.0:
  • 操作系统: MacOS 10.12

错误日志

wx.request 一个请求,还是提示
URL 域名不合法,请在 mp 后台配置后重试

需要有什么配置嘛?

@chemzqm
Copy link
Collaborator

chemzqm commented Oct 17, 2016

@b1g3rr0r 这个是升级官方 101400 引入的 bug,最新版本 0.2.5 已修复这个问题。你需要:

npm update wept -g 

更新

@chemzqm chemzqm closed this as completed Oct 17, 2016
@keyding
Copy link
Author

keyding commented Oct 17, 2016

45e284e5-a273-460c-8d1c-e829389c16e1
刚更新完,这个提示。

onReady: function () {
    wx.request({
      url: 'https://api.douban.com/v2/movie/in_theaters',
      success: function (res) {
        console.log(res.data)
      }
    })
  }

@chemzqm chemzqm reopened this Oct 17, 2016
@chemzqm
Copy link
Collaborator

chemzqm commented Oct 17, 2016

后端代理的问题,应该是没有 https 的支持,我下午想办法解决下。

@chemzqm chemzqm self-assigned this Oct 17, 2016
@chemzqm
Copy link
Collaborator

chemzqm commented Oct 17, 2016

@b1g3rr0r 我测试已经可以请求 https 了,但是豆瓣那边对请求做了更严格的验证,我正在处理。

@chemzqm
Copy link
Collaborator

chemzqm commented Oct 17, 2016

新建了 #9 issue,这个先关闭了

@chemzqm chemzqm closed this as completed Oct 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants