Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4714

Removing a Cookie value using regex

$
0
0

@sbonar wrote:

I am trying to remove a cookie value by using the following:

http-request replace-header Cookie (;?\ ?sessionid=[^;];?\ ?)(.|\r\n) \2

If I have read the docs correctly this will find the 'sessionid' cookie value in the Cookie header and replace it with whatever comes after it, whether it is a string or a '\r\n'.

This appears to work, for the most part, but there are times that it also removes the values before it.

1) what am I doing wrong???
2) is there another way to do this??

Scott

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4714

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>