{"action":"created","issue":{"url":"https://api.github.com/repos/opentable/oc/issues/618","repository_url":"https://api.github.com/repos/opentable/oc","labels_url":"https://api.github.com/repos/opentable/oc/issues/618/labels{/name}","comments_url":"https://api.github.com/repos/opentable/oc/issues/618/comments","events_url":"https://api.github.com/repos/opentable/oc/issues/618/events","html_url":"https://github.com/opentable/oc/issues/618","id":254214045,"number":618,"title":"Accessing s3 over a proxy from oc-registy","user":{"login":"NapoleanReigns","id":11515253,"avatar_url":"https://avatars2.githubusercontent.com/u/11515253?v=4","gravatar_id":"","url":"https://api.github.com/users/NapoleanReigns","html_url":"https://github.com/NapoleanReigns","followers_url":"https://api.github.com/users/NapoleanReigns/followers","following_url":"https://api.github.com/users/NapoleanReigns/following{/other_user}","gists_url":"https://api.github.com/users/NapoleanReigns/gists{/gist_id}","starred_url":"https://api.github.com/users/NapoleanReigns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NapoleanReigns/subscriptions","organizations_url":"https://api.github.com/users/NapoleanReigns/orgs","repos_url":"https://api.github.com/users/NapoleanReigns/repos","events_url":"https://api.github.com/users/NapoleanReigns/events{/privacy}","received_events_url":"https://api.github.com/users/NapoleanReigns/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-31T05:25:44Z","updated_at":"2017-08-31T15:27:11Z","closed_at":null,"author_association":"NONE","body":"I am hosting my oc-registry process as a seperate docker container over an EC2 instance in AWS and the access to s3 bucket from this instance would be via a proxy.\r\nwe have been patching our local version of oc with below piece of code change for this to work for our use case.\r\n\r\nPatch File: src/registry/domain/s3.js\r\n\r\n`const proxy = require('proxy-agent'); \r\nmodule.exports = function (conf) {\r\n const httpOptions = { timeout: conf.s3.timeout || 10000 }; \r\n if (conf.s3.agentProxy) { httpOptions.agent = proxy(conf.s3.agentProxy); } \r\nAWS.config.update({ \r\naccessKeyId: conf.s3.key, \r\nsecretAccessKey: conf.s3.secret, region: conf.s3.region, \r\nhttpOptions, });`\r\n\r\nthis needs to be fixed here.\r\nhttps://github.com/opentable/oc/blob/6651c60be60e46a6803e865074f8e632e65f489f/src/registry/domain/s3.js#L20\r\n\r\ni think httpOptions should also consider conf.s3.agentProxy.\r\n\r\nThank you"},"comment":{"url":"https://api.github.com/repos/opentable/oc/issues/comments/326331343","html_url":"https://github.com/opentable/oc/issues/618#issuecomment-326331343","issue_url":"https://api.github.com/repos/opentable/oc/issues/618","id":326331343,"user":{"login":"matteofigus","id":1789893,"avatar_url":"https://avatars2.githubusercontent.com/u/1789893?v=4","gravatar_id":"","url":"https://api.github.com/users/matteofigus","html_url":"https://github.com/matteofigus","followers_url":"https://api.github.com/users/matteofigus/followers","following_url":"https://api.github.com/users/matteofigus/following{/other_user}","gists_url":"https://api.github.com/users/matteofigus/gists{/gist_id}","starred_url":"https://api.github.com/users/matteofigus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matteofigus/subscriptions","organizations_url":"https://api.github.com/users/matteofigus/orgs","repos_url":"https://api.github.com/users/matteofigus/repos","events_url":"https://api.github.com/users/matteofigus/events{/privacy}","received_events_url":"https://api.github.com/users/matteofigus/received_events","type":"User","site_admin":false},"created_at":"2017-08-31T15:27:11Z","updated_at":"2017-08-31T15:27:11Z","author_association":"MEMBER","body":"I think I would be in favour of adding this optional property. Would you be able to do a PR for that?"}}
{"actor":{"display_login":"matteofigus"}}