Skip to content

Commit 4429a06

Browse files
committed
Release 2.22
1 parent 74fc770 commit 4429a06

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Changes.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to `lua-resty-session` will be documented in this file.
44

5+
## [2.22] - 2018-03-17
6+
### Fixed
7+
- Only sets self.cookie.secure if not defined.
8+
59
## [2.21] - 2018-03-16
610
### Screwed
711
- Forgot to bump version number.

lib/resty/session.lua

+5-2
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ local function init()
203203
end
204204

205205
local session = {
206-
_VERSION = "2.21"
206+
_VERSION = "2.22"
207207
}
208208

209209
session.__index = session
@@ -268,7 +268,10 @@ function session.open(opts)
268268
self = session.new(opts)
269269
end
270270

271-
self.cookie.secure = var.scheme == "https" or var.https == "on"
271+
if self.cookie.secure == nil then
272+
self.cookie.secure = var.scheme == "https" or var.https == "on"
273+
end
274+
272275
self.key = concat{
273276
self.check.ssi and var.ssl_session_id or "",
274277
self.check.ua and var.http_user_agent or "",

0 commit comments

Comments
 (0)