0
votes

Environment: Worklight 6.2 HTTP Adapter

Response header from backend contains cookies with key (WC_PERSISTENT)

adapter.xml has

<connectionPolicy xsi:type="http:HTTPConnectionPolicyType"
            cookiePolicy="IGNORE_COOKIES" maxRedirects="20">

But responseHeaders contains duplicate keys, it seems Worklight server is adding this key.

WC_PERSISTENT cookie is used to track session management in websphere commerce and session timeout is managed in WAS console.

I am new to Websphere, how can I remove the duplicate cookie or not let Worklight add it in responseHeader?

Sample cookie:

"arr": [ 
"WC_PERSISTENT=pLeLrvmT3fn9TbLo7qEiK1Q5Ss0%3d%0a%3b2015%2d09%2d23+04%3a39%3a39%2e966%5f1442983179966%2d465081%5f0; Expires=Thu, 22 Sep 2016 04:39:39 GMT; Path=\/; Domain=.xyz.com", 
"COSTEXCLVAT=disabled; Path=\/; Domain=.xyz.com", 
"XYZStats.trailingTag=XYZStats.member,private|; Path=\/; Domain=.xyz.com", 
"WC_SESSION_ESTABLISHED=true; Path=\/; Domain=.xyz.com", 
"WC_PERSISTENT=kIPpdZQy9v8DUCpCLMHSg6zpkYM%3d%0a%3b2015%2d09%2d23+04%3a39%3a40%2e057%5f1442983179966%2d465081%5f7; Expires=Thu, 22 Sep 2016 04:39:39 GMT; Path=\/; Domain=.xyz.com", 
"WC_AUTHENTICATION_1632733901=1632733901%2cuIeVQv0MRMpXTg32wGaT9zj1QVM%3d; Path=\/; Domain=.xyz.com; Secure", 
"WC_ACTIVEPOINTER=%2d20%2c7; Path=\/; Domain=.xyz.com", 
"WC_USERACTIVITY_16327111111=163211111%2c7%2c0%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cnull%2cbUjUqwUJf8g6D2mrgAw%2fkNzqKJpY%2fs4MXGXY53%2fpMwMxcerOUca5SRGOS%2fmVYKga2zpr9CpT57L9%0akK%2fF3nRmN47DSCdUKGitR4vnxvU%2brBuoX%2f0vLXPmVYLT1XNkgPfYhXPpAm33UHHDpgqqArBnZg%3d%3d; Path=\/; Domain=.xyz.com" 
]

But if we request back-end from curl we get only 1 instance of WC_PERSISTENT

1
Provide the full response. It is not clear what you are referring to by duplicate cookies.Idan Adar

1 Answers

0
votes

From a Worklight perspective it does not duplicate these cookies. It does sound like the cookies come from WebSphere Commerce ("WC"). I do suggest to contact the WebSphere Commerce support team.

Also note that setting the cookiePolicy of the HTTP adapter as "ignoreCookies" does not mean that cookies will not be added - again, these cookies are coming from the response from your backend/application server, not Worklight. Read more about an HTTP adapter's cookiePolicy parameter here: What does the cookiePolicy adapter parameter do in Worklight 6.1+?