mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-08 20:56:04 +00:00
Update ResourceServer.cs
This commit is contained in:
parent
c95b7a373b
commit
eb32437f96
|
@ -218,7 +218,7 @@ namespace WelsonJS.Launcher
|
||||||
private async Task<bool> TryServeFromCdn(HttpListenerContext context, string path)
|
private async Task<bool> TryServeFromCdn(HttpListenerContext context, string path)
|
||||||
{
|
{
|
||||||
bool isNodePackageExpression = _nodePackageRegex.IsMatch(path);
|
bool isNodePackageExpression = _nodePackageRegex.IsMatch(path);
|
||||||
Func<CDN_TYPES, bool> isPrefixMatched = (type) =>
|
bool isPrefixMatched(CDN_TYPES type)
|
||||||
{
|
{
|
||||||
if (CDN_PREFIXES[(int)type].Any(prefix => path.StartsWith(prefix)))
|
if (CDN_PREFIXES[(int)type].Any(prefix => path.StartsWith(prefix)))
|
||||||
{
|
{
|
||||||
|
@ -226,7 +226,7 @@ namespace WelsonJS.Launcher
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
}
|
||||||
|
|
||||||
var sources = new (bool isMatch, string configKey, Func<string, string> transform)[]
|
var sources = new (bool isMatch, string configKey, Func<string, string> transform)[]
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user