数据接口api请求添加域名

This commit is contained in:
2024-05-15 11:08:18 +08:00
parent fd6f2db9f2
commit 2d1c362bf6

View File

@@ -325,6 +325,10 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController
{
dicParameters = input.paramList.ToDictionary(x => x.field, y => y.defaultValue);
}
if (!string.IsNullOrEmpty(info.Path) && !info.Path.StartsWith("http"))
{
info.Path = $"{App.HttpContext.Request.Scheme}://{App.HttpContext.Request.Host}{info.Path}";
}
VerifyRequired(info, dicParameters);
ReplaceParameterValue(info, dicParameters);
if (info?.DataType == 1)