识别dotnet版本跟nginx没关系

This commit is contained in:
大石头 2025-06-22 23:28:41 +08:00
parent aaa370c394
commit f8d3a097ec
2 changed files with 3 additions and 6 deletions

View File

@ -122,10 +122,6 @@ public class DeployService
if (version == null || attachment == null) return false;
if (attachment.Extension != ".zip") return false;
// 读取其中的nginx文件识别监听端口
var deploy = version.Deploy;
if (deploy == null || deploy.Port != 0 && !deploy.Urls.IsNullOrEmpty()) return false;
var fi = attachment.GetFilePath(uploadPath).AsFile();
if (!fi.Exists) return false;

View File

@ -1,4 +1,5 @@
using System.Text;
using System.Diagnostics.CodeAnalysis;
using System.Text;
using NewLife;
using NewLife.Collections;
@ -204,7 +205,7 @@ public class NginxFile
if (backends == null || backends.Length == 0) return;
var location = GetLocation(true);
location.Directives["proxy_pass"] = backends.Select(e => e.TrimEnd('/')).ToList();
location!.Directives["proxy_pass"] = backends.Select(e => e.TrimEnd('/')).ToList();
}
#endregion
}