优化后台首页Cookie限制path

pull/354/MERGE
Karson 2021-12-29 11:03:24 +08:00
parent 12ea49d937
commit acca6a0584
1 changed files with 2 additions and 2 deletions

View File

@ -240,8 +240,8 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'form'], functi
var createCookie = function (name, value) { var createCookie = function (name, value) {
var date = new Date(); var date = new Date();
date.setTime(date.getTime() + (365 * 24 * 60 * 60 * 1000)); date.setTime(date.getTime() + (365 * 24 * 60 * 60 * 1000));
var path = Fast.api.fixurl('index/index'); var path = Config.moduleurl;
document.cookie = encodeURIComponent(Config.cookie.prefix + name) + "=" + encodeURIComponent(value) + "; " + path + "; expires=" + date.toGMTString(); document.cookie = encodeURIComponent(Config.cookie.prefix + name) + "=" + encodeURIComponent(value) + "; path=" + path + "; expires=" + date.toGMTString();
}; };
var my_skins = [ var my_skins = [