mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-12-21 19:09:45 +08:00
修改cookie中没有path的问题
addCookies时如果path没有指定,path默认为/
This commit is contained in:
@@ -44,7 +44,7 @@ public class SaTokenCookieUtil {
|
||||
*/
|
||||
public static void addCookie(HttpServletResponse response, String name, String value, String path, String domain, int timeout) {
|
||||
Cookie cookie = new Cookie(name, value);
|
||||
if(SaTokenInsideUtil.isEmpty(path) == false) {
|
||||
if(SaTokenInsideUtil.isEmpty(path) == true) {
|
||||
path = "/";
|
||||
}
|
||||
if(SaTokenInsideUtil.isEmpty(domain) == false) {
|
||||
@@ -95,4 +95,4 @@ public class SaTokenCookieUtil {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user