Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 0818f68dd774f5522a2c62bd8a7c7cc79910b0b5 1 parent f1a5d3f
@dsyer dsyer authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  ext/nginx/uls.lua
View
2  ext/nginx/uls.lua
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.