Browse files

Add Path=/ explicitly to vcap session cookie

Without this the default is the path of the current request
so if user visits /foo/bar and then /bar he will get different
cookies, and if sticky sessions are in effect those requests
will land on different servers in the back end.

Change-Id: I009b74d33c77d5fb854006cc91582aa159aafcbd
  • Loading branch information...
1 parent f1a5d3f commit 0818f68dd774f5522a2c62bd8a7c7cc79910b0b5 @dsyer dsyer committed Nov 27, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 ext/nginx/uls.lua
@@ -168,7 +168,7 @@ function vcap_handle_cookies(ngx)
if not sticky then return end
- local vcap_cookie = VCAP_SESSION_ID.."="..ngx.var.sticky
+ local vcap_cookie = VCAP_SESSION_ID.."="..ngx.var.sticky.."; Path=/"
ngx.log(ngx.DEBUG, "generate cookie:"..vcap_cookie.." for resp from:"..

0 comments on commit 0818f68

Please sign in to comment.