java - How do i disable HttpOnly cookies in Vaadin? -
I have set a cookie in Plaintiff and tried to get it from another application that was running on a different server But I was not able to get the cookie I got in Vodin?
We only need to disable the httpOnly cookie.
Can someone help me "How to solve this problem?" header you delete If you are working in servlet 3.0 or in a new environment, then your web.xml as the following: Note Also see: set-cookie . You can use the following code to get it:
URLConnection urlConnection = new URL ("url-of-your-web-app-here"). OpenConnection (); & Lt; String & gt; Cookies List = urlConnection.getHeaderFields (). Get ("Set-Cookie"); By
http only :
response.setHeader ("set-cookie", "name" Flag can delete = value; http only ");
& lt; Session-config & gt; & Lt; Cookie-config & gt; & Lt; Http-only & gt; False & lt; / -only http & gt; & Lt; / Cookie-config & gt; & Lt; / Session-config & gt;
HttpOnly flag is an additional flag that is used to prevent any XSS (cross-site scripting) , Getting access to session cookies
Comments
Post a Comment