Conversation
var source = options.source || 'default'; | ||
this.server = options.registry || spmrc.get('registry') || 'http://spmjs.io'; | ||
this.server = this.server.replace(/\/$/, ''); | ||
options.proxy = options.proxy || spmrc.get('proxy'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
话说这个 proxy 是做什么用的?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yuan.js 在发起请求时的代理。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
registry 不是可以指定代理服务器么?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
代理服务器和源服务器是不一样的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
原理是什么?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
request 的 proxy 参数:https://github.com/mikeal/request#requestoptions-callback
spmrc 没升级 |
呃,漏了。。 |
spmrc 最好加上默认的 registry 。https://github.com/spmjs/spmrc/blob/5f94843ce35df9bf1b8230364a749f20ebbdaec0/index.js#L44 |
方案:#888