0
lalande1988 created
Prerequisites
Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
- What is your product version? => 9.01 (.net 3.1)
- What is your product type (Angular or MVC)? => MVC
- What is product framework type (.net framework or .net core)? => .net core
Question
The task is to "Set-Cookie Secure", as outlined here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#syntax:
Current
Below is the Google DevTools print which shows that Content Security Policy (CSP) has been added - completed (upper arrow).
Question: Next, the secure cookie is required (lower arrow). Would you be able to help (which code in which file?)
Thanks!
2 Answer(s)
-
0
Hi,
If you use HTTPS, I think it should be already secured. You can also configure cookie options as shown below;
services.Configure<CookiePolicyOptions>(options => { options.Secure = CookieSecurePolicy.Always; });
-
0
Hi,
excellent, this is perfect. Thank you!