Forum Discussion
D_T
Cirrus
Feb 10, 2023Copy Cookie Header with new Header Name
How could I go about copying a cookie header into another cookie name. I don't want to rename but make a duplicate with a new name. I am not finding too much on this particular topic. Thank you!
Paulius
MVP
Feb 10, 2023D_T I believe what you are trying to do is the following which will search for the cookie and then insert a new cookie with the same value as the old cookie and the header will have both the old and new cookie in it.
when HTTP_REQUEST {
if {[HTTP::header exists "old-cookie-name"]}{
HTTP::cookie insert name "new-cookie-name" value [HTTP::cookie value "old-cookie-name"]
}
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects