Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Add Path=/ explicitly to vcap session cookie
Browse files Browse the repository at this point in the history
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
dsyer committed Nov 27, 2012
1 parent f1a5d3f commit 0818f68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/nginx/uls.lua
Expand Up @@ -168,7 +168,7 @@ function vcap_handle_cookies(ngx)
end
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:"..
ngx.var.backend_addr)
Expand Down

0 comments on commit 0818f68

Please sign in to comment.