Jump to content
Toggle menu
  • 51 articles
  • 24 files
  • 4 users
  • 750 edits
Tech-Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Cookies replacement

From Tech-Wiki


Technical reference for Cookies replacement.

Reference

Rename a cookie by inserting a new cookie name with the same value as the original. Then remove the old cookie.

when HTTP_REQUEST {
 # Check if old cookie exists in request
 if { [HTTP::cookie exists "old-cookie-name"] } {
   # Insert a new cookie with the new name and old cookie's value
   HTTP::cookie insert name "new-cookie-name" value [HTTP::cookie value "old-cookie-name"]
   # Remove the old cookie
   HTTP::cookie remove "old-cookie-name" 
  }
}

See also