Tool: <https://gitlab-content.toolforge.org/>
Source code: <https://gitlab.wikimedia.org/toolforge-repos/gitlab-content>
Issues: <https://phabricator.wikimedia.org/tag/tool-gitlab-content/>
Docs: <https://wikitech.wikimedia.org/wiki/Tool:Gitlab-content>

Wikimedia GitLab content proxy
(<https://gitlab-content.toolforge.org/>) is a reverse proxy for
fetching raw file content from gitlab.wikimedia.org. This
functionality can be combined with mw.loader.load to enable side
loading content hosted on our gitlab server from a userscript, a
user's common.js and global.js, or similar JavaScript workflow
customization contexts.

Directly fetching a raw file from gitlab will always respond with a
`text/plain` mime type to prevent various cross-site scripting (XSS)
attacks against gitlab itself. By running in an isolated Toolforge
domain gitlab-content can safely add useful mime types like
`text/javascript` or `text/css`.

The general use I envision for a proxy like this is enabling a
collaborative development workflow including linting, unit tests, code
generation, and code review on gitlab.wikimedia.org without a separate
copy-and-paste step to publish scripts to a Wikimedia wiki for
integration and acceptance testing. I do not have an example
userscript repo showing how to set up all those workflow tools yet,
but I expect that the community will come up with their own examples
soon if the workflow is actually useful.

See the tool's documentation for some discussion of the risks that
using a reverse proxy like this one in your own userscripts or
global.js. The tool can technically be used in other on-wiki
javascript contexts, but I would caution against using it with
published gadgets, site-wide MediaWiki:Common.js, or other similar
pages. These are shared spaces and some of them affect people who do
not even know they are there.

Bryan
-- 
Bryan Davis                                        Wikimedia Foundation
Principal Software Engineer                               Boise, ID USA
[[m:User:BDavis_(WMF)]]                                      irc: bd808
_______________________________________________
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

Reply via email to