环境:Worklight 6.2 HTTP适配器
来自后端的响应头包含带密钥的cookie(WC_PERSISTENT)
adapter.xml有
<connectionPolicy xsi:type="http:HTTPConnectionPolicyType"
cookiePolicy="IGNORE_COOKIES" maxRedirects="20">
但是responseHeaders包含重复的键,似乎Worklight服务器正在添加此键。
WC_PERSISTENT cookie用于跟踪websphere商务中的会话管理,会话超时在WAS控制台中管理。
我是Websphere的新手,如何删除重复的Cookie或不让Worklight将其添加到responseHeader中?
示例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"
]
但是如果我们从curl请求后端,我们只得到1个WC_PERSISTENT实例
答案 0 :(得分:0)
从Worklight的角度来看,它不会复制这些cookie。它听起来像是来自WebSphere Commerce的Cookie(&#34; WC&#34;)。我建议联系WebSphere Commerce支持团队。
另请注意,将HTTP适配器的cookiePolicy设置为&#34; ignoreCookies&#34;并不意味着不会添加cookie - 再次,这些cookie来自您的后端/应用程序服务器的响应,而不是Worklight。在此处详细了解HTTP适配器的cookiePolicy参数:What does the cookiePolicy adapter parameter do in Worklight 6.1+?