Customize Client Cookie Forwarding
A client can send cookies to the WSRP Consumer as part of a HTTP request. You can customize the WSRP Consumer to forward specific client cookies to the Producer WSRP ports or to other resources that are served by the WSRP Consumer as a proxy.
By default the WSRP Consumer does not forward client cookies to WSRP Producers or other resources. To customize the WSRP Consumer to forward specific client cookies, proceed as follows:
Description:
- Set the following property in the HTTP Client Service:
wsrp.consumer.cookieforward.cookiename = hostdomainnames [; cookiepriority]Specify a separate property for each client cookie that you want to be forwarded.
- Restart the portal or the cluster for the new setting to become active.
wsrp.consumer.cookieforward.cookiename = hostdomainnames [; cookiepriority]Defines a cookie forwarding rule for the cookie that is identified by the value for cookiename . The cookie forwarding rule specifies a list of host names and domain names and optionally specifies the cookie priority.
Example properties that contain cookie forwarding rules are as follows:
cookienameThe value for cookiename must match the cookie name literally.
hostdomainnameThis comprises a comma separated list of host names and domain names. The cookie will be forwarded to Producers whose WSRP port endpoint URLs match to entries in the host domain name list. The WSRP Consumer also forwards the client cookies to resources that are served by the WSRP Consumer as a proxy and whose URLs accord to the host domain name list. The host domain name can contain host names, such as alpha.company.com, or domain names that are identified by a leading period ( . ) such as .sample.com . The WSRP Consumer literally matches the host domain names to the Producer WSRP port endpoint URLs and resource URLs. It does not translate IP addresses into host domain names or vice versa.
cookiepriorityThis setting is optional. You can use it to specify the cookie priority. The WSRP Consumer uses the cookie priority to control how priority conflicts between client cookies and producer set cookies with identical names are resolved. Valid values are as follows:
clientfirstThis priority setting directs the WSRP Consumer to give a client cookie priority over an identically named cookie set by the Producer. In other words, it instructs the WSRP Consumer to send the client cookie to the WSRP Producer or resource and not to send the Producer cookie.
clientlastThis priority setting directs the WSRP Consumer to prioritize a cookie set by the WSRP Producer over a client cookie. In other words, it instructs the WSRP Consumer to send the cookie set by the WSRP Producer to the WSRP Producer or resource and not to send the client cookie. This is the default priority setting. For example, it is applied if the cookie priority is not specified in the cookie forwarding rule.
wsrp.consumer.cookieforward.SAMPLECOOKIE = alpha.company.com,.sample.orgWith this setting the WSRP Consumer will forward the client cookie named SAMPLECOOKIE to the host alpha.company.com and to all hosts contained in the domain sample.org . It assumes the default cookie priority clientlast .
wsrp.consumer.cookieforward.COOKIE2 = .myorg.com,beta.sample.com;clientfirstWith this setting the WSRP Consumer will forward the client cookie named COOKIE2 to the host beta.sample.com and to all hosts in the domain myorg.com . It gives client cookies first priority.
The WSRP Consumer does not send cookies when it requests the WSDL service description documents from a Producer.
Parent
Customize the WSRP configuration of Consumer portal
Related tasks
Customize the WSRP resource proxy
Parallel portlet rendering with WSRP
Switching off the caching of Producer service descriptions
Set service configuration properties