Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Allow outbound proxy config; breaking change | mediawiki/services/citoid | master | +24 -13 | |
[WIP] Convert scrape.js into an object | mediawiki/services/citoid | master | +0 -0 |
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Mvolz | T62768 Cite: Auto-filled references based on destination URL / DOI etc. | |||
Resolved | Jdforrester-WMF | T90281 Improve citoid production service | |||
Resolved | Jdforrester-WMF | T89656 Get citoid working in production | |||
Resolved | • mobrovac | T89875 Configure citoid to use outbound proxy | |||
Resolved | Mvolz | T88894 Citoid will get results localised for server location, not user | |||
Resolved | Mvolz | T90341 Let outbound proxy be configurable | |||
Resolved | Mvolz | T89968 Make requests.js an object and pass through citoid config |
Event Timeline
Change 192562 had a related patch set uploaded (by Mvolz):
[WIP] Convert scrape.js into an object
This is pretty straightforward. In your config, add a proxy stanza. Then, when you read the configuration in (anywhere in the service's process, the sooner the better, ofc), simply set:
process.env.HTTP_PROXY = config.proxy
The setting will be automatically picked up by the request lib (which is used in Citoid to do external requests). Note that, to be on the safe side, process.env.HTTPS_PROXY should be set as well.
Is there a reason to prefer this approach rather than defining request lib once and setting the proxy there (i.e. var r = request.defaults({'proxy':'http://localproxy.com'}))?
In general I am shy of modifying environmental variables for security reasons. Although process.env says "You can write to this object, but changes won't be reflected outside of your process." So hopefully means it's secure...
Change 195024 had a related patch set uploaded (by Mvolz):
[WIP] Allow outbound proxy config; breaking change
@akosiaris, do we need a special config for HTTPS, or is the HTTP proxy configured to resolve those as well (i.e. on the same port)?
@mobrovac, no url-downloader.wikimedia.org is capable of proxying HTTPS traffic as well.
@mobrovac, no url-downloader.wikimedia.org is capable of proxying HTTPS traffic as well.
Perfect, thnx.
Resolved, I think?
Yup.