diff --git a/src/Http/Headers/src/SameSiteMode.cs b/src/Http/Headers/src/SameSiteMode.cs index 1976386c85..29c08a5984 100644 --- a/src/Http/Headers/src/SameSiteMode.cs +++ b/src/Http/Headers/src/SameSiteMode.cs @@ -1,13 +1,20 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. namespace Microsoft.Net.Http.Headers { - // RFC Draft: https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00 + /// + /// Indicates if the client should include a cookie on "same-site" or "cross-site" requests. + /// RFC Draft: https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00 + /// + // This mirrors Microsoft.AspNetCore.Http.SameSiteMode public enum SameSiteMode { + /// No SameSite field will be set, the client should follow its default cookie policy. None = 0, + /// Indicates the client should send the cookie with "same-site" requests, and with "cross-site" top-level navigations. Lax, + /// Indicates the client should only send the cookie with "same-site" requests. Strict } } diff --git a/src/Http/Http.Features/src/SameSiteMode.cs b/src/Http/Http.Features/src/SameSiteMode.cs index 0ae4481e3d..d1af765a93 100644 --- a/src/Http/Http.Features/src/SameSiteMode.cs +++ b/src/Http/Http.Features/src/SameSiteMode.cs @@ -1,14 +1,20 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. namespace Microsoft.AspNetCore.Http { - // RFC Draft: https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00 + /// + /// Used to set the SameSite field on response cookies to indicate if those cookies should be included by the client on future "same-site" or "cross-site" requests. + /// RFC Draft: https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00 + /// // This mirrors Microsoft.Net.Http.Headers.SameSiteMode public enum SameSiteMode { + /// No SameSite field will be set, the client should follow its default cookie policy. None = 0, + /// Indicates the client should send the cookie with "same-site" requests, and with "cross-site" top-level navigations. Lax, + /// Indicates the client should only send the cookie with "same-site" requests. Strict } }