如何在Java中为HttpServletRequest对象添加安全标志和httponly

时间:2019-03-01 07:01:38

标签: httprequest

我需要在请求的对象中启用安全和HTTPON  而且我尝试过一些类似代码的POST请求

postRequest.setHeader(“ Set-Cookie”,“ JSESSIONID =” + SESSION_ID +“; Secure; HttpOnly”);

AND FOR HttpServletRequest对象

request.setAttribute(“ Set-Cookie”,“ JSESSIONID =” + jSessionID +“; Secure; HttpOnly”);

enter image description here

enter image description here

0 个答案:

没有答案