aspnetcore/security/gdpr/includes/gdpr6.md
:::moniker range="= aspnetcore-6.0"
Pages/Privacy.cshtml page or Views/Home/Privacy.cshtml view provides a page to detail your site's privacy policy.To enable the default cookie consent feature like that found in the ASP.NET Core 2.2 templates in a current ASP.NET Core template generated app, add the following highlighted code to Program.cs:
[!code-csharpMain]
In the preceding code, xref:Microsoft.AspNetCore.Builder.CookiePolicyOptions and xref:Microsoft.AspNetCore.Builder.CookiePolicyAppBuilderExtensions.UseCookiePolicy%2A are used.
Add the cookie consent partial to the _Layout.cshtml file:
[!code-cshtmlMain]
Add the _CookieConsentPartial.cshtml file to the project:
[!code-cshtmlMain]
Select the ASP.NET Core 2.2 version of this article to read about the cookie consent feature.
Some databases and storage mechanisms allow for encryption at rest. Encryption at rest:
For example:
For databases that don't provide built-in encryption at rest, you may be able to use disk encryption to provide the same protection. For example:
:::moniker-end