parent
760e82feb1
commit
559e3e22ad
|
|
@ -28,7 +28,8 @@ namespace NP.BO.Controllers
|
|||
ViewBag.IsSubAdmin97 = SUserInfo.IsSubAdmin97;
|
||||
|
||||
//로그인을 위해서 다 https로 돌림
|
||||
if (!Request.IsSecureConnection && GetConfig("usessl") == "Y")
|
||||
if (!Request.IsSecureConnection && GetConfig("usessl") == "Y"
|
||||
&& (!Request.Url.AbsolutePath.ToUpper().StartsWith("/ACCOUNT/")))
|
||||
{
|
||||
filterContext.Result = new RedirectResult("https://" + Request.Url.Host + Request.Url.PathAndQuery);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,19 @@ namespace NP.Base
|
|||
public const String SUIFCROOM = "NPTECHSUIFCROOM";
|
||||
public const String SUIFTCROOM = "NPTECHSUIFTCROOM";
|
||||
private const String SUIDATE = "190517";
|
||||
private bool? securev = null;
|
||||
|
||||
private bool IsSecure
|
||||
{
|
||||
get
|
||||
{
|
||||
if(securev == null)
|
||||
{
|
||||
securev = GetConfig("usessl") == "Y";
|
||||
}
|
||||
return securev.Value;
|
||||
}
|
||||
}
|
||||
|
||||
public NP.Model.SSUserInfo SUserInfo = new Model.SSUserInfo();
|
||||
public void SSClear()
|
||||
|
|
@ -913,13 +926,19 @@ namespace NP.Base
|
|||
SUserInfo.UserInfo + "$" +
|
||||
SUserInfo.LoginKey + "$" +
|
||||
DateTime.Now.ToString("yyMMddHHmmss") + "$" +
|
||||
SUserInfo.LoginIP) + ";SameSite=None");
|
||||
SUserInfo.LoginIP) + (IsSecure ? ";SameSite=None" : ""));
|
||||
if (IsSecure)
|
||||
{
|
||||
c.Secure = true;
|
||||
c.HttpOnly = true;
|
||||
}
|
||||
Response.Cookies.Add(c);
|
||||
var c2 = new System.Web.HttpCookie(TopMenuNo == 1 ? SUIT : SUIFT, EncString(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")) + ";SameSite=None");
|
||||
var c2 = new System.Web.HttpCookie(TopMenuNo == 1 ? SUIT : SUIFT, EncString(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")) + (IsSecure ? ";SameSite=None" : ""));
|
||||
if (IsSecure)
|
||||
{
|
||||
c2.Secure = true;
|
||||
c2.HttpOnly = true;
|
||||
}
|
||||
Response.Cookies.Add(c2);
|
||||
if (isFront)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue