[01:27:21] [[Tech]]; Gryllida; /* E-mail adress for Wikinews */ -?; https://meta.wikimedia.org/w/index.php?diff=19837786&oldid=19835848&rcid=14930962 [01:38:14] [[Tech]]; Gryllida; /* E-mail adress for Wikinews */ +; https://meta.wikimedia.org/w/index.php?diff=19837795&oldid=19837786&rcid=14930979 [14:59:16] Is there a scenario where mw.user.tokens.get('csrfToken') ever returns falsey? [14:59:45] Logged out still gets the suffixes [18:26:27] Relaying Q from my friend: "where is the Dockerfile for docker-compose stuff?" [18:32:09] My MediaWiki 1.27.1 sends out the following HTTP Response Header in relation to Cache-Control: [18:32:21] private, must-revalidate, max-age=0 [18:32:57] I would like to add 'no-transform' value to this. How and where is this done in MW? [18:37:02] The reason is that Google arbitrarily transcodes websites in certain regions of the world using their using googleweblight.com which completely breaks any otherwise good web site: https://support.google.com/webmasters/answer/6211428?hl=en [18:38:47] However, I have not seen them applying it to Wikipedia pages, but just about any other website which does not include the 'no-transform' value in its header. [18:40:10] I could not find any LocalSettings config option for adding the header. [18:41:40] It should relate to all pages of a wiki. Are these the files to modify?: [18:42:04] In /usr/home/wiki/includes/OutPutPage.php [18:42:06] In /usr/home/wiki/includes/api/ApiMain.php [18:42:35] yeah, it seems to be pretty hard-coded in OutputPage::sendCacheControl() as far as I can tell https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/73862de93b743e6f58f35536036b3780db947a58/includes/OutputPage.php#2405 [18:42:48] I would guess that you only need to adjust that one, not ApiMain [18:43:22] Thanks. [18:46:23] revi: there's not a Dockerfile in mediawiki/core - we're using images built from this repository: https://gerrit.wikimedia.org/r/plugins/gitiles/releng/dev-images/ [18:46:57] brennen: yeah I expected it would be outside the core :-p [18:46:58] Thanks [18:50:47] Alternatively, I could add an .htaccess file with a Header set Cache-Control "no-transform" but is that recommended or possible with MW? [18:52:02] no idea if that would work [18:52:15] I guess Apache would have to combine that with the header received from MediaWiki [18:52:19] I don’t know if it does that [18:56:34] Ok. Maybe it's better find exactly where to add the "no-transform" value to the code in OutputPage.php to take effect in all situations. [19:31:56] I only added no-transform on one line of my installation, as on line 2444 on https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/73862de93b743e6f58f35536036b3780db947a58/includes/OutputPage.php#2444 [19:32:50] My MW is now sending out the header: Cache-Control: private, must-revalidate, max-age=0, no-transform [19:33:05] I'm not sure if it should need to be anywhere else? [19:36:07] Anyway, googleweblight.com therefore does not take effect, or rather, google first sends searchers to googleweblight.com which in turn sees the header and redirects the user to the correct site. [19:39:39] As said, this googleweblight.com application does not do what it claims in converting particularly slow loading pages but rather redirects searches of entire countries to reformatted and most likely broken versions of a websites displayed through the eyes of googleweblight.com - terrible system! [19:44:39] If you are in what google's system perceives to be a country with a generally fast connectivity, chances are that you haven't come across googlewebligt.com even if you happen to experience a slow connection. As said, they've appeared to have spared Wikipedia but certainly not any other MediaWiki powered site or website, no matter how fast it is. [19:52:09] Thanks for having pointed me in the right direction. The problem appears to have been solved. Although, it would be good to have LocalSettings option to append the no-tranform header more easily unbreak this googleweblight.com mess in the future. [19:52:53] I meant to more easily unbreak ...