How it works...
For our cookie-based session tracking, we set a cookie named cookbook to use as the tracking for session persistence. This is also set with an expiry of one hour. It's also possible to explicitly set the domain and path as well if greater restrictions are required.
Our learn-based tracking has three variables set. The first, create is used to track from the upsteam server, which we look for the cookie set header (Set-Cookie) using a naming pattern $upstream_cookie_<cookiename>. For our recipe, $upstream_cookie_sessionid means we match the sessionid.
Next, we use the lookup variable to designate what to track from the client. This uses a similar tracking method to the create command. This recipe uses the $cookie_sessionid
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access