|
|
@ -911,12 +911,12 @@ namespace UMC.ITME
|
|
|
|
|
|
|
|
|
|
|
|
if (String.IsNullOrEmpty(sStrDomain) == false)
|
|
|
|
if (String.IsNullOrEmpty(sStrDomain) == false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
getUrl = new Uri(sStrDomain);// new Uri(new, PathAndQuery);
|
|
|
|
getUrl = new Uri(sStrDomain);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
getUrl = Domain;// new Uri(Domain, PathAndQuery);
|
|
|
|
getUrl = Domain;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var Method = login["Method"] as string ?? "GET";
|
|
|
|
var Method = login["Method"] as string ?? "GET";
|
|
|
@ -1312,14 +1312,6 @@ namespace UMC.ITME
|
|
|
|
var checkConfig = GetConf(String.Format("SITE_MIME_{0}_CHECK", proxy.Site.Root).ToUpper());
|
|
|
|
var checkConfig = GetConf(String.Format("SITE_MIME_{0}_CHECK", proxy.Site.Root).ToUpper());
|
|
|
|
if (checkConfig.ContainsKey("Finish"))
|
|
|
|
if (checkConfig.ContainsKey("Finish"))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
// if (String.IsNullOrEmpty(proxy.Site.Home) == false && proxy.Site.Home.StartsWith("http") == false)
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// var r = proxy.Reqesut(this.Context.Transfer(new Uri(proxy.Domain, proxy.Site.Home))).Get();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// proxy.SetCookie(r);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
var config = new Hashtable();
|
|
|
|
var config = new Hashtable();
|
|
|
|
|
|
|
|
|
|
|
|
if (proxy.IsLog == true)
|
|
|
|
if (proxy.IsLog == true)
|
|
|
@ -2788,7 +2780,7 @@ namespace UMC.ITME
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool SaveCookie()
|
|
|
|
internal bool SaveCookie()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
if (this.IsChangeUser == true)
|
|
|
|
if (this.IsChangeUser == true)
|
|
|
@ -2828,6 +2820,7 @@ namespace UMC.ITME
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
siteCookie.Config = this.SiteCookie.Config;
|
|
|
|
siteCookie.Config = this.SiteCookie.Config;
|
|
|
|
|
|
|
|
siteCookie.Cookies = this.SiteCookie.Cookies;
|
|
|
|
siteCookie.LoginTime = UMC.Data.Utility.TimeSpan();
|
|
|
|
siteCookie.LoginTime = UMC.Data.Utility.TimeSpan();
|
|
|
|
this.IsChangeUser = null;
|
|
|
|
this.IsChangeUser = null;
|
|
|
|
DataFactory.Instance().Put(siteCookie);
|
|
|
|
DataFactory.Instance().Put(siteCookie);
|
|
|
@ -3025,6 +3018,21 @@ namespace UMC.ITME
|
|
|
|
this.Context.AddHeader(key, this.Context.Headers.Get("Origin") ?? m_HttpHeaders.Get(i));
|
|
|
|
this.Context.AddHeader(key, this.Context.Headers.Get("Origin") ?? m_HttpHeaders.Get(i));
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "itme-access-token":
|
|
|
|
|
|
|
|
if (this.Site.Site.UserModel == Entities.UserModel.Bridge)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var access = m_HttpHeaders.Get(i);
|
|
|
|
|
|
|
|
if (String.Equals(this.SiteCookie.Cookies, access) == false)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
this.SiteCookie.Cookies = access;
|
|
|
|
|
|
|
|
this.IsChangeUser = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
goto default;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
case "strict-transport-security":
|
|
|
|
case "strict-transport-security":
|
|
|
|
case "content-type":
|
|
|
|
case "content-type":
|
|
|
|
case "server":
|
|
|
|
case "server":
|
|
|
@ -3267,6 +3275,16 @@ namespace UMC.ITME
|
|
|
|
user = this.Account;
|
|
|
|
user = this.Account;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case Entities.UserModel.Bridge:
|
|
|
|
|
|
|
|
if (this.Site.Site.IsAuth == true)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
user = this.Account;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (String.IsNullOrEmpty(this.SiteCookie.Cookies) == false)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
heaers.Add("itme-access-token", this.SiteCookie.Cookies);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
heaers.Add("umc-request-user-name", Uri.EscapeDataString(user.Name));
|
|
|
|
heaers.Add("umc-request-user-name", Uri.EscapeDataString(user.Name));
|
|
|
|
heaers.Add("umc-request-user-id", UMC.Data.Utility.Guid(user.Id.Value));
|
|
|
|
heaers.Add("umc-request-user-id", UMC.Data.Utility.Guid(user.Id.Value));
|
|
|
|