问题
How to get jsessionid
shown in browser console in worklight. I have tried document.cookie
, but it was invain. I am able to get only WL_PERSISTENT_COOKIE
value here.
var sessionId = document.cookie;
Edit:
Pls see http://i.stack.imgur.com/VMm5p.png
On giving document.cookie, I am getting the value of WL_PERSISTENT_COOKIE
. But I need the value of JSESSIONID
.
回答1:
JSESSIONID
in Worklight is flagged as HttpOnly
.
This is a security feature that prevents JavaScript access of a cookie, therefore reducing risks of XSS attacks.
They may be workarounds I don't know about.
Read more: https://www.owasp.org/index.php/HttpOnly
来源:https://stackoverflow.com/questions/27010359/how-to-get-jsessionid-shown-in-browser-console-in-worklight