Added check on https port

This commit is contained in:
Luca Deri 2021-05-22 15:09:16 +02:00
parent 45f0f80296
commit 44922f5222

View file

@ -256,7 +256,11 @@ function sendHTTPHeaderIfName(mime, ifname, maxage, content_disposition, extra_h
}
if(_SESSION ~= nil) then
local key = "session_"..info.http_port.."_"..info.https_port
local key = "session_"
ifinfo.http_port ~= nil) then key = key ..info.http_port end
ifinfo.https_port ~= nil) then key = key ..info.https_port end
lines[#lines + 1] = 'Set-Cookie: '..key..'='.._SESSION["session"]..'; max-age=' .. maxage .. '; path=/; ' .. cookie_attr
end