Fix server stability issue

This commit is contained in:
Gaël Métais
2021-01-14 00:24:22 +00:00
parent 3123e90d5a
commit 405d53220b
+5 -3
View File
@@ -758,11 +758,13 @@ var Redownload = function() {
return request.isHTML && request.weightCheck && request.weightCheck.bodyBuffer;
});
if (!htmlRequest) {
return false;
}
debug('Checking if it is WordPress on file %s', htmlRequest.url);
if (htmlRequest &&
(htmlRequest.weightCheck.bodyBuffer.indexOf('/wp-content/') >= 0 ||
htmlRequest.weightCheck.bodyBuffer.indexOf('/wp-includes/') >= 0)) {
if (htmlRequest.weightCheck.bodyBuffer.indexOf('/wp-content/') >= 0 || htmlRequest.weightCheck.bodyBuffer.indexOf('/wp-includes/') >= 0) {
debug('Response: yes.');
return true;
} else {