Page MenuHomePhabricator

localsettings.js ought to contain a setting to override User-Agent and SSL cert verification
Closed, ResolvedPublic


As an English Wikipedia bot operator, I am using Parsoid to retrieve parsed HTML versions of Wikipedia articles as part of the operation of my bot. As I'm trying to be a good citizen and not cause the nice people in WMF's analytics department any particular headaches, I thought it might be sensible to set a custom User-Agent string for my requests.

I can only do this by overriding the string set manually in lib/mediawiki.ApiRequest.js - making it so that this can be overridden from the localsettings.js would be quite useful for bot operators who are using Parsoid to retrieve parsed copies of content from MediaWiki installations.

(I may be able to prepare a patch, but filing the issue first in case I don't get around to it.)

Event Timeline

tommorris raised the priority of this task from to Needs Triage.
tommorris updated the task description. (Show Details)
tommorris added a project: Parsoid.
tommorris added a subscriber: tommorris.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 24 2015, 4:30 PM
ssastry triaged this task as Normal priority.Jan 24 2015, 4:36 PM
ssastry set Security to None.
ssastry moved this task from Backlog to Maintenance / Tech-Debt on the Parsoid board.
ssastry claimed this task.Apr 28 2015, 6:52 PM

In the same vein, from IRC:

11:39:08 +gwicke on the topic of making things configurable: a recurring request is to allow requests to hosts with a self-signed cert
11:41:07 +gwicke lists a rejectUnauthorized option
11:42:41 +gwicke discussion for request at
11:42:59 +gwicke setting NODE_TLS_REJECT_UNAUTHORIZED=0 seems to work too

GWicke renamed this task from localsettings.js ought to contain a setting to override User-Agent to localsettings.js ought to contain a setting to override User-Agent and SSL cert verification.May 6 2015, 6:47 PM
ssastry removed ssastry as the assignee of this task.May 22 2015, 3:54 PM
ssastry added a subscriber: ssastry.

The user-agent part is done. Unassigning myself.

ssastry moved this task from In Progress to Backlog on the Parsoid board.May 22 2015, 3:55 PM
Arlolra closed this task as Resolved.May 22 2015, 5:10 PM
Arlolra claimed this task.
Arlolra added a subscriber: Arlolra.

In T72761, we added a global parsoidConfig strictSSL to allow self-signed certs.

T66003 is to specify that config per mw api.