提交 fa92438e 编写于 作者: S Stefan Spieker

only set secure if request is secure

上级 8b5244e8
......@@ -4560,7 +4560,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
throw new ServletException();
Cookie cookie = new Cookie("iconSize", Functions.validateIconSize(qs));
cookie.setMaxAge(/* ~4 mo. */9999999); // #762
cookie.setSecure(true);
cookie.setSecure(req.isSecure());
cookie.setHttpOnly(true);
rsp.addCookie(cookie);
String ref = req.getHeader("Referer");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册