Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/harugon/mediawiki-extensions-cloudflare
MediaWikiの編集時にCloudflareのキャッシュをパージする
https://github.com/harugon/mediawiki-extensions-cloudflare
cloudflare mediawiki mediawiki-extension
Last synced: about 1 month ago
JSON representation
MediaWikiの編集時にCloudflareのキャッシュをパージする
- Host: GitHub
- URL: https://github.com/harugon/mediawiki-extensions-cloudflare
- Owner: harugon
- License: mit
- Created: 2021-12-30T15:26:04.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-11-04T11:31:55.000Z (about 2 months ago)
- Last Synced: 2024-11-04T12:30:18.767Z (about 2 months ago)
- Topics: cloudflare, mediawiki, mediawiki-extension
- Language: PHP
- Homepage: https://www.mediawiki.org/wiki/Extension:Cloudflare
- Size: 49.8 KB
- Stars: 1
- Watchers: 1
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.en.md
- License: LICENSE
Awesome Lists containing this project
README
# Cloudflare® - MediaWiki
This extension purges Cloudflare cache when updating pages or re-uploading images, with the primary aim of clearing image cache.
It's recommended to read the page [Using CloudFlare with MediaWiki – harugon's blog](https://blog.r9g.net/archives/121) before installation.
## Requirements
- PHP 7.4
- MediaWiki 1.35## Install
Download the file `Cloudflare-{version}.tar.gz` from the URL [Releases · harugon/mediawiki-extensions-cloudflare](https://github.com/harugon/mediawiki-extensions-cloudflare/releases) and extract it to the extensions directory.
Add the following to LocalSettings.php along with your Cloudflare API information:
```php
wfLoadExtension('Cloudflare');
$wgCloudflareEmail = '';
$wgCloudflareAPIKey = '';
$wgCloudflareZoneID = '';
```## Config
| Variable | Default value | Notes |
| ------------------------ | ------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `$wgCloudflareEmail` | `""` | Your email used for logging in Cloudflare |
| `$wgCloudflareAPIKey` | `""` | API key ([API token - Cloudflare](https://dash.cloudflare.com/profile/api-tokens) → Your global API key is needed) |
| `$wgCloudflareZoneID` | `""` | Site (URL) ID (You can get it from the dashboard of the site) |
| `$wgCloudflarePurgePage` | `false` | Purge cache when articles are updated |
| `$wgCloudflarePurgeFile` | `true` | Purge cache when files (images) are updated |
|### Caching Article Pages
If enabling `$wgCloudflarePurgePage`, it's necessary to set a Page Rule of Bypass Cache on Cookie. (Only available on Business and Enterprise plans.)
## Issues
- API Rate limits
- When Varnish is in place... (There's a possibility that Cloudflare may disappear first in the sequence Cloudflare->Varnish->origin?)## Disclaimer
Cloudflare, the Cloudflare logo, and Cloudflare Workers are trademarks and/or registered trademarks of Cloudflare, Inc. in the United States and other jurisdictions.