为此Cookie指定了无效的domain.test.com

时间:2019-01-30 08:36:07

标签: java cookies

为什么我不能在Java中设置通配符域cookie?

Cookie cookie = new Cookie("id", "c");
cookie.setDomain(".test.com");
response.addCookie(cookie);
response.sendRedirect(redirect);
return new ResponseEntity<>(response, HttpStatus.SEE_OTHER);

为此Cookie指定了无效的域[.test.com]

谢谢

0 个答案:

没有答案