Some of you have noticed problems with dynamic content on
lojban.org
now that we've started using CloudFlare. I haven't been able to
figure out how to fix this, so here's what's going on; maybe
somebody else will have ideas.
So the goal of CloudFlare, primarily, was to make it so that if my
server went down, the site would be basically fine. This we have
acheived.
However, to do so, I had to use brute force. Here's our CloudFlare
page rules:
*
lojban.org/*&* Cache Level: Bypass
*
lojban.org/*edit* Cache Level: Bypass
*
lojban.org/*Special:* Cache Level: Bypass
*
lojban.org/*Talk:* Cache Level: Bypass
*
lojban.org/* Browser Cache TTL: 30 minutes, Always Online: On, Cache Level: Cache Everything, Edge Cache TTL: 2 hours, Origin Cache Control: Off
That last one is a very large hammer that says "just cache the hell
out of everything".
The reason I need that hammer is that mediawiki is returning
absurdly wrong caching headers. Here's an example that entirely
bypasses CloudFlare:
$ curl -k -v -H 'Host:
mw.lojban.org' -L
https://jukni.lojban.org/papri/pronunciation 2>&1 | less
[snip]
< HTTP/1.1 200 OK
< Date: Thu, 06 Feb 2020 06:26:31 GMT
< Server: Apache/2.4.38 (Debian)
< X-Powered-By: PHP/7.3.14
< X-Content-Type-Options: nosniff
< Content-language: en
< Vary: Accept-Encoding,Cookie
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Cache-Control: private, must-revalidate, max-age=0
^^ That. That Cache-Control line is absurd, and effectively
completely disableds CloudFlare.
I have tested this by talking *directly* to the mediawiki server,
no SSL, no proxies, no nothing; it's the same.
Our LocalSettings.php file is attached.
I don't care if the solution is on the mediawiki side or the
CloudFlare side, but at this point I've sunk more time into this
than I can afford and I've come up empty, so I'd appreciate any
ideas you might have.
Having said that, if you're going to point me at
https://www.mediawiki.org/wiki/Manual:CloudFlare#Integration_with_MediaWiki
, you'll need to tell me exactly which part you think is relevant,
and why. Most of that page is about making X-Forwarded-For: do the
right thing, which is totally irrelevant to this problem.
Thanks for any help.