I was trying something like this:
map $http_referer $setCookie {
default "referrer={$http_referer};Domain=.verbalink.com";
~*test1\.com "referrer=bl;Domain=.verbalink.com;Max-Age=31536000";
}
server{
add_header Set-Cookie $setCookie;
}
But when the cookie is created it has ${http_referer} as the value not the actual http referer. I also tried {$http_referer} and $http_referer but none worked. How can I get the referer into my Cookie?
The resulting value can be a string or another variable. © http://nginx.org/r/map
vs.
value can contain variables © http://nginx.org/r/add_header