CookiePattern — specify regular expression to extract session ID out of a client cookie
The directive sets the regular expression that Interchange will use to extract the session ID out of the client browser's cookie.
This is useful in extracting session IDs out of cookies generated by programs other than Interchange.
Example: Setting CookiePattern
The default regular expression pattern used for CookiePattern
might work sometimes, but I find it unsuitable if you just want to change
the CookieName
, because it then breaks the usual behavior.
Here's a better value for common setups:
CookiePattern \w{8,32}
In general, however, you should only modify CookiePattern
default
value if you somehow change the content
that Interchange stores in browser cookies (by say, letting other program create
the cookie).
For a complete discussion on cookies, see cookie glossary entry.
By default, Interchange cookie planted in user's browser consists of a session ID followed by a colon followed by an IP address, username or domain name.
Interchange 5.9.0:
Source: lib/Vend/Config.pm
Line 3891 (context shows lines 3891-3903)
sub parse_regex { my($var, $value) = @_; eval { my $never = 'NeVAirBE'; $never =~ m{$value}; }; if($@) { config_error("Bad regular expression in $var."); } return $value; }