diff --git a/Monitor/Pages/Login.cshtml b/Monitor/Pages/Login.cshtml index ad74c3b..41d69fd 100644 --- a/Monitor/Pages/Login.cshtml +++ b/Monitor/Pages/Login.cshtml @@ -28,7 +28,6 @@ -
diff --git a/Monitor/Pages/Login.cshtml.cs b/Monitor/Pages/Login.cshtml.cs index a78502c..3996159 100644 --- a/Monitor/Pages/Login.cshtml.cs +++ b/Monitor/Pages/Login.cshtml.cs @@ -32,18 +32,7 @@ namespace Monitor.Pages HttpContext.Session.SetString("LoggedIn" + PTMagicConfiguration.GeneralSettings.Monitor.Port.ToString(), DateTime.UtcNow.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fff'Z'")); PTMagicConfiguration.GeneralSettings.Monitor.IsPasswordProtected = true; //PTMagicConfiguration.WriteGeneralSettings(); - if (cbRememberMe != null) - { - if (cbRememberMe.Equals("on", StringComparison.InvariantCultureIgnoreCase)) - { - CookieOptions cookieOption = new CookieOptions(); - cookieOption.Expires = DateTime.UtcNow.AddYears(1); - - string cookieValue = EncryptionHelper.Encrypt(encryptedPassword); - - Response.Cookies.Append("PTMRememberMeKey", cookieValue, cookieOption); - } - } + Response.Redirect(PTMagicConfiguration.GeneralSettings.Monitor.RootUrl); } diff --git a/Monitor/Pages/_Layout.cshtml b/Monitor/Pages/_Layout.cshtml index 8096a29..337bab8 100644 --- a/Monitor/Pages/_Layout.cshtml +++ b/Monitor/Pages/_Layout.cshtml @@ -101,7 +101,6 @@ diff --git a/Monitor/Startup.cs b/Monitor/Startup.cs index fa46e14..6a62a6f 100644 --- a/Monitor/Startup.cs +++ b/Monitor/Startup.cs @@ -50,7 +50,7 @@ namespace Monitor services.AddDistributedMemoryCache(); services.AddSession(options => { - options.IdleTimeout = TimeSpan.FromSeconds(900); + options.IdleTimeout = TimeSpan.FromSeconds(1800); options.Cookie.HttpOnly = true; options.Cookie.Name = "PTMagicMonitor" + systemConfiguration.GeneralSettings.Monitor.Port.ToString(); });