redirect outdated paths of font-awesome
This commit is contained in:
parent
67d4f0016f
commit
37c3e99921
|
@ -37,6 +37,7 @@
|
||||||
"GoogleDomains": true,
|
"GoogleDomains": true,
|
||||||
"ReqAnalyzer": true,
|
"ReqAnalyzer": true,
|
||||||
"MathJax3Files": true,
|
"MathJax3Files": true,
|
||||||
|
"RedirectMap": true,
|
||||||
|
|
||||||
"fileGuard": true,
|
"fileGuard": true,
|
||||||
"files": true,
|
"files": true,
|
||||||
|
|
|
@ -466,6 +466,13 @@ const LogString = {
|
||||||
'IFRAME': 'Possible iframe request:',
|
'IFRAME': 'Possible iframe request:',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const RedirectMap = {
|
||||||
|
'resources/font-awesome/3.2.1/css/all.min.css': 'resources/font-awesome/3.2.1/css/font-awesome.min.css',
|
||||||
|
'resources/font-awesome/3.2.1/css/all.css': 'resources/font-awesome/3.2.1/css/font-awesome.min.css',
|
||||||
|
'resources/font-awesome/4.7.0/css/all.min.css': 'resources/font-awesome/4.7.0/css/font-awesome.min.css',
|
||||||
|
'resources/font-awesome/4.7.0/css/all.css': 'resources/font-awesome/4.7.0/css/font-awesome.min.css'
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https://codeberg.org/nobody/LocalCDN/issues/1560
|
* https://codeberg.org/nobody/LocalCDN/issues/1560
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -223,6 +223,8 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
targetPath = requestAnalyzer._redirectTargetFile(targetPath);
|
||||||
|
|
||||||
// Prepare and return a local target.
|
// Prepare and return a local target.
|
||||||
return {
|
return {
|
||||||
'source': channelHost,
|
'source': channelHost,
|
||||||
|
@ -248,6 +250,11 @@ requestAnalyzer._findLocalTarget = function (resourceMappings, basePath, channel
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
requestAnalyzer._redirectTargetFile = function (targetPath) {
|
||||||
|
return RedirectMap[targetPath] || targetPath;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
requestAnalyzer._getPathOfBundle = function (initiator, channelHost, channelPath, targetPath, bundle) {
|
requestAnalyzer._getPathOfBundle = function (initiator, channelHost, channelPath, targetPath, bundle) {
|
||||||
let filename = channelPath.split('/').pop();
|
let filename = channelPath.split('/').pop();
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,9 @@
|
||||||
<h2>New in LocalCDN:</h2>
|
<h2>New in LocalCDN:</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="release-notes-area">
|
<div class="release-notes-area">
|
||||||
<p></p>
|
<p>Improved</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li></li>
|
<li>redirect outdated paths of font-awesome</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="generator-section">
|
<div id="generator-section">
|
||||||
|
|
Loading…
Reference in New Issue