Added cookies wiht the symbolic timezone name (tzname) and the offset west with respect to uTC (timezone)

Example
tzname=CET; Max-Age=60
timezone-3600; Max-Age=60

Fixes #6277
This commit is contained in:
Luca Deri 2022-02-04 13:27:41 +01:00
parent efe9516bdc
commit 63d1fe49c4
3 changed files with 8 additions and 1 deletions

View file

@ -272,6 +272,8 @@ function sendHTTPHeaderIfName(mime, ifname, maxage, content_disposition, extra_h
local lines = {
'Cache-Control: max-age=0, no-cache, no-store',
'Server: ntopng '..info["version"]..' ['.. info["platform"]..']',
'Set-Cookie: tzname=' .. info.tzname .. '; Max-Age=60',
'Set-Cookie: timezone' .. info.timezone .. '; Max-Age=60',
'Pragma: no-cache',
'X-Frame-Options: DENY',
'X-Content-Type-Options: nosniff',
@ -287,7 +289,7 @@ function sendHTTPHeaderIfName(mime, ifname, maxage, content_disposition, extra_h
if(ifname ~= nil) then
lines[#lines + 1] = 'Set-Cookie: ifname=' .. ifname .. '; path=/' .. cookie_attr
end
if(content_disposition ~= nil) then
lines[#lines + 1] = 'Content-Disposition: '..content_disposition
end