Use UnixEpoch for cookie deletion (#18126)
Use the DateTimeOffset.UnixEpoch field instead of a new DateTime value when deleting cookies.
This commit is contained in:
parent
c802134737
commit
b6b5319bab
|
|
@ -129,7 +129,7 @@ namespace Microsoft.AspNetCore.Http
|
|||
{
|
||||
Path = options.Path,
|
||||
Domain = options.Domain,
|
||||
Expires = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc),
|
||||
Expires = DateTimeOffset.UnixEpoch,
|
||||
Secure = options.Secure,
|
||||
HttpOnly = options.HttpOnly,
|
||||
SameSite = options.SameSite
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ namespace Microsoft.AspNetCore.Internal
|
|||
SameSite = options.SameSite,
|
||||
Secure = options.Secure,
|
||||
IsEssential = options.IsEssential,
|
||||
Expires = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc),
|
||||
Expires = DateTimeOffset.UnixEpoch,
|
||||
HttpOnly = options.HttpOnly,
|
||||
});
|
||||
|
||||
|
|
@ -305,7 +305,7 @@ namespace Microsoft.AspNetCore.Internal
|
|||
SameSite = options.SameSite,
|
||||
Secure = options.Secure,
|
||||
IsEssential = options.IsEssential,
|
||||
Expires = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc),
|
||||
Expires = DateTimeOffset.UnixEpoch,
|
||||
HttpOnly = options.HttpOnly,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue