fix: expire sid after 30 days

This commit is contained in:
Oliver Booth 2024-02-25 14:17:11 +00:00
parent 6db9537206
commit 9a447db891
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5

View File

@ -98,7 +98,7 @@ internal sealed class SessionService : BackgroundService, ISessionService
IPAddress? remoteIpAddress = response.HttpContext.Connection.RemoteIpAddress;
_logger.LogDebug("Writing cookie 'sid' to HTTP response for {RemoteAddr}", remoteIpAddress);
response.Cookies.Append("sid", Convert.ToBase64String(buffer));
response.Cookies.Append("sid", Convert.ToBase64String(buffer), new CookieOptions { Expires = DateTimeOffset.UtcNow + TimeSpan.FromDays(30) });
}
/// <inheritdoc />