Page MenuHomePhabricator

parsoid should allow binding to a specific IP or interface
Closed, ResolvedPublic

Description

Author: bugzilla

Description:
I would like to have parsoid bind to localhost. This is a simple patch for me, but I think it should be an option so I don't have to modify the server.js file:

  • app.listen(process.env.VCAP_APP_PORT || 8000);

+ app.listen(process.env.VCAP_APP_PORT || 8000, 'localhost');

For me, binding only to localhost just reduces the exposure of parsoid for a private wiki. In some cases, I could see wanting to bind to a specific interface to point parsoid toward a private network or something similar.


Version: unspecified
Severity: enhancement

Details

Reference
bz60262

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:09 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz60262.

Would this best be exposed through localsetting.js, environment variable or command line option?

bugzilla wrote:

Since the port is currently an environmental variable, it makes sense to do this the same way. If the long term goal is to push more settings into the configuration file, then maybe that's the right place to go.

Change 110230 had a related patch set uploaded by Arlolra:
Add port and host env vars to ParsoidService

https://gerrit.wikimedia.org/r/110230

Change 110230 merged by jenkins-bot:
Add port and host env vars to ParsoidService

https://gerrit.wikimedia.org/r/110230

Now exposed as PARSOID_PORT & PARSOID_HOST.