-
-
Notifications
You must be signed in to change notification settings - Fork 6
Open

Description
When behind a proxy, ember try:each
will not work as the HTTP request will fall in timeout.
Here is a proposition of a correction:
// index.js
'use strict';
const got = require('got');
module.exports = function(channelType, options = {}) {
let HOST = process.env.EMBER_SOURCE_CHANNEL_URL_HOST || 'https://s3.amazonaws.com';
let PATH = 'builds.emberjs.com';
return got(`${HOST}/${PATH}/${channelType}.json`, Object.assign({}, { json: true }, options)).then(
result => `${HOST}/${PATH}${result.body.assetPath}`
);
};
Then, the user is responsible to update its own ember-try.js
configuration
// config/ember-try.js
const getChannelURL = require('ember-source-channel-url');
const tunnel = require('tunnel-agent');
const options = {
agent: tunnel.httpOverHttp({
proxy: {
host: 'myproxy.mycompany.com',
port: 8080
}
})
};
module.exports = function() {
return Promise.all([
getChannelURL('release', options),
getChannelURL('beta', options),
getChannelURL('canary', options)
]).then((urls) => {
...
What do you think of this ?
Shadowere and jelhan
Metadata
Metadata
Assignees
Labels
No labels