diff --git a/README.md b/README.md index fc5003a..7135963 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,8 @@ plugin_port = 7200 admin_user = admin ;the password of manage ui,optional admin_pwd = admin +;specified login state keep time in seconds.0 - before the browser completely exit, don't need to re-login,greater than 0: when Idle time exceeds this value,you should re-login +admin_keep_time = 0 ; enable tls tls_mode = false @@ -58,8 +60,6 @@ dashboard_addr = 127.0.0.1 dashboard_port = 7500 dashboard_user = admin dashboard_pwd = admin -; if your frps dashboard enable tls, change this to true -dashboard_tls = false [users] ;user user1 with meta_token 123 diff --git a/README_zh.md b/README_zh.md index 332495b..b1b67c7 100644 --- a/README_zh.md +++ b/README_zh.md @@ -49,6 +49,8 @@ plugin_port = 7200 admin_user = admin ;插件管理页面密码,与账号一起进行鉴权,可选 admin_pwd = admin +;登录状态空闲时间(秒):0-浏览器完全退出前不用重新登录,大于0-空闲超过此时间则需要重新登录. +admin_keep_time = 0 ; frps 面板页面是否启用https访问,如果为true,则只能通过https访问 tls_mode = false @@ -60,8 +62,6 @@ dashboard_addr = 127.0.0.1 dashboard_port = 7500 dashboard_user = admin dashboard_pwd = admin -; 如果frps的dashboard启用了tls,则把这个选项置为true,否则无法获取服务器信息 -dashboard_tls = false [users] ;user1的meta_token为123 diff --git a/assets/static/js/login.js b/assets/static/js/login.js index 2dfc2ea..caf5a6a 100644 --- a/assets/static/js/login.js +++ b/assets/static/js/login.js @@ -14,8 +14,7 @@ }, success: function (result) { if (result.success) { - document.cookie = 'token=' + result.token + ';path=/' - window.location.href = "/" + window.location.reload(); } else { layui.layer.msg(result.message); } diff --git a/assets/templates/index.html b/assets/templates/index.html index fd23a47..2f026f5 100644 --- a/assets/templates/index.html +++ b/assets/templates/index.html @@ -26,7 +26,7 @@