Update ResourceServer.cs

This commit is contained in:
Namhyeon Go 2025-05-05 21:34:50 +09:00
parent c95b7a373b
commit eb32437f96

View File

@ -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)[]
{ {