增加Cookie安全性,支持设置Cookie的HttpOnly和Secure属性

This commit is contained in:
ooknight
2021-09-27 01:09:30 +08:00
parent 4fb1ea96fb
commit 7acf5e9790
6 changed files with 70 additions and 25 deletions

View File

@@ -28,7 +28,7 @@ public class SaResponseForSolon implements SaResponse {
}
@Override
public void addCookie(String name, String value, String path, String domain, int timeout) {
public void addCookie(String name, String value, String path, String domain, int timeout, boolean isHttpOnly, boolean isSecure) {
if (Utils.isNotEmpty(path)) {
path = "/";
}