diff --git a/rootfs/etc/nginx/lua/balancer/sticky.lua b/rootfs/etc/nginx/lua/balancer/sticky.lua index 1b82e5efd8..3e542fe95c 100644 --- a/rootfs/etc/nginx/lua/balancer/sticky.lua +++ b/rootfs/etc/nginx/lua/balancer/sticky.lua @@ -52,7 +52,6 @@ local function set_cookie(self, value) key = self.cookie_name, value = value, path = cookie_path, - domain = ngx.var.host, httponly = true, secure = ngx.var.https == "on", } diff --git a/rootfs/etc/nginx/lua/test/balancer/sticky_test.lua b/rootfs/etc/nginx/lua/test/balancer/sticky_test.lua index d1dc969396..8b9741d3f6 100644 --- a/rootfs/etc/nginx/lua/test/balancer/sticky_test.lua +++ b/rootfs/etc/nginx/lua/test/balancer/sticky_test.lua @@ -119,7 +119,7 @@ describe("Sticky", function() local expected_len = #util[test_backend_hash_fn .. "_digest"]("anything") assert.equal(#payload.value, expected_len) assert.equal(payload.path, ngx.var.location_path) - assert.equal(payload.domain, ngx.var.host) + assert.equal(payload.domain, nil) assert.equal(payload.httponly, true) assert.equal(payload.secure, false) return true, nil @@ -148,7 +148,7 @@ describe("Sticky", function() local expected_len = #util[test_backend_hash_fn .. "_digest"]("anything") assert.equal(#payload.value, expected_len) assert.equal(payload.path, ngx.var.location_path) - assert.equal(payload.domain, ngx.var.host) + assert.equal(payload.domain, nil) assert.equal(payload.httponly, true) assert.equal(payload.secure, true) return true, nil