Compare commits
No commits in common. "d165632cc8207d74839b48add3fd65da9abb3aeb" and "460575d9592f9ccafe3f43bbdc6cd48a81c331c1" have entirely different histories.
d165632cc8
...
460575d959
|
|
@ -366,25 +366,17 @@ namespace IRaCIS.Core.Domain.Share
|
|||
{
|
||||
public static string GetClientIP(this HttpContext context)
|
||||
{
|
||||
//scp 服务创建的记录不能获取请求上下文
|
||||
if (context != null)
|
||||
{
|
||||
var ip = context.Request.Headers["Cdn-Src-Ip"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(ip))
|
||||
return IpReplace(ip);
|
||||
|
||||
ip = context.Request.Headers["X-Forwarded-For"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(ip))
|
||||
return IpReplace(ip);
|
||||
|
||||
ip = context.Connection.RemoteIpAddress.ToString();
|
||||
|
||||
var ip = context.Request.Headers["Cdn-Src-Ip"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(ip))
|
||||
return IpReplace(ip);
|
||||
}
|
||||
else
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
ip = context.Request.Headers["X-Forwarded-For"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(ip))
|
||||
return IpReplace(ip);
|
||||
|
||||
ip = context.Connection.RemoteIpAddress.ToString();
|
||||
|
||||
return IpReplace(ip);
|
||||
}
|
||||
|
||||
static string IpReplace(string inip)
|
||||
|
|
|
|||
|
|
@ -75,8 +75,6 @@ public class TaskInstanceConfigration : IEntityTypeConfiguration<TaskInstance>
|
|||
public void Configure(EntityTypeBuilder<TaskInstance> builder)
|
||||
{
|
||||
builder.HasKey(e => e.SeqId);
|
||||
|
||||
builder.HasOne(e => e.TaskStudy).WithMany(t=>t.InstanceList).HasForeignKey(t => t.StudyId).HasPrincipalKey(st => st.Id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -106,8 +104,6 @@ public class SCPInstanceConfigration : IEntityTypeConfiguration<SCPInstance>
|
|||
public void Configure(EntityTypeBuilder<SCPInstance> builder)
|
||||
{
|
||||
builder.HasKey(e => e.SeqId);
|
||||
|
||||
builder.HasOne(e => e.SCPStudy).WithMany(t => t.InstanceList).HasForeignKey(t => t.StudyId).HasPrincipalKey(st => st.Id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue