File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Security/CookiePolicy/src Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,13 @@ namespace Microsoft.AspNetCore.Http;
8
8
/// <summary>
9
9
/// Options used to create a new cookie.
10
10
/// </summary>
11
+ /// <remarks>
12
+ /// A <see cref="CookieOptions"/> instance is intended to govern the behavior of an individual cookie.
13
+ /// Reusing the same <see cref="CookieOptions"/> instance across multiple cookies can lead to unintended
14
+ /// consequences, such as modifications affecting multiple cookies. We recommend instantiating a new
15
+ /// <see cref="CookieOptions"/> object for each cookie to ensure that the configuration is applied
16
+ /// independently.
17
+ /// </remarks>
11
18
public class CookieOptions
12
19
{
13
20
private List < string > ? _extensions ;
Original file line number Diff line number Diff line change @@ -13,6 +13,14 @@ namespace Microsoft.AspNetCore.CookiePolicy;
13
13
/// <summary>
14
14
/// Initializes a new instance of <see cref="CookiePolicyMiddleware"/>.
15
15
/// </summary>
16
+ /// <remarks>
17
+ /// When using <see cref="CookieOptions"/> to configure cookies, note that a
18
+ /// <see cref="CookieOptions"/> instance is intended to govern the behavior of an individual cookie.
19
+ /// Reusing the same <see cref="CookieOptions"/> instance across multiple cookies can lead to unintended
20
+ /// consequences, such as modifications affecting multiple cookies. We recommend instantiating a new
21
+ /// <see cref="CookieOptions"/> object for each cookie to ensure that the configuration is applied
22
+ /// independently.
23
+ /// </remarks>
16
24
public class CookiePolicyMiddleware
17
25
{
18
26
private readonly RequestDelegate _next ;
You can’t perform that action at this time.
0 commit comments