
ASP.NET Core 5 Secure Coding Cookbook
By :

Cookies are essential in maintaining state in ASP.NET Core web applications. Sensitive cookies, such as the ones that are used for authenticated sessions should only be transmitted over HTTPS and marked as HTTP-Only
to stop attackers from stealing information stored in these cookies.
In this recipe, we are going to configure cookie policies that will prevent our ASP.NET Core sample web application from generating persistent cookies.
We will use the Online Banking app we used in the previous recipe. Using Visual Studio Code, open the sample Online Banking app folder at \Chapter07\information-exposure2\before\OnlineBankingApp\
.
You can perform the steps in this folder to fix information exposure through the persistent cookies recipe.
Let's take a look at the steps for this recipe: