Mjbmr has uploaded a new change for review.
https://gerrit.wikimedia.org/r/189446
Change subject: Explicit maximum age for action=raw
......................................................................
Explicit maximum age for action=raw
Change-Id: I46592cc9f2cbffab5bab2f0aaca04f4a8bd61da8
hange-Id: I1011ee64dd9013598d1969a79b869ee926928009
---
M RELEASE-NOTES-1.25
M includes/actions/RawAction.php
2 files changed, 17 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/46/189446/1
diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25
index 3b7eef3..cb40b19 100644
--- a/RELEASE-NOTES-1.25
+++ b/RELEASE-NOTES-1.25
@@ -40,8 +40,12 @@
rather than 'rsvg'.
* Default value of $wgSVGConverters['ImageMagick'] now uses transparent
background with white fallback color, rather than just white background.
- * MediaWikiBagOStuff class removed, make sure any object cache config
+* MediaWikiBagOStuff class removed, make sure any object cache config
uses SqlBagOStuff instead.
+* $wgPageShowWatchingUsers was removed.
+* $wgExplicitRawSMaxageCSS was added.
+* $wgExplicitRawSMaxageJS was added.
+* $wgExplicitRawSMaxageContent was added.
=== New features in 1.25 ===
* (T64861) Updated plural rules to CLDR 26. Includes incompatible changes
diff --git a/includes/actions/RawAction.php b/includes/actions/RawAction.php
index 727bed2..adeba26 100644
--- a/includes/actions/RawAction.php
+++ b/includes/actions/RawAction.php
@@ -90,6 +90,18 @@
}
}
+ $explicitRawSMaxageCSS = $config->get( 'ExplicitRawSMaxageCSS'
);
+ $explicitRawSMaxageJS = $config->get( 'ExplicitRawSMaxageJS' );
+ $explicitRawSMaxageContent = $config->get(
'ExplicitRawSMaxageContent' );
+
+ if ( $contentType == 'text/css' && !is_null(
$explicitRawSMaxageCSS ) ) {
+ $smaxage = $explicitRawSMaxageCSS;
+ } elseif( $contentType == 'text/javascript' && !is_null(
$explicitRawSMaxageJS ) ) {
+ $smaxage = $explicitRawSMaxageJS;
+ } elseif( $contentType == 'text/x-wiki' && !is_null(
$explicitRawSMaxageContent ) ) {
+ $smaxage = $explicitRawSMaxageContent;
+ }
+
$maxage = $request->getInt( 'maxage', $config->get(
'SquidMaxage' ) );
$response = $request->response();
--
To view, visit https://gerrit.wikimedia.org/r/189446
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I46592cc9f2cbffab5bab2f0aaca04f4a8bd61da8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mjbmr <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits