title: Why Antiforgery CookieSecurePolicy not applying?
body: <p>I want to make my Antiforgery cookies secured, so I add some changes to my code:</p>
  <pre><code>    services.AddMvc();
  
      services.AddAntiforgery(opts =&gt; {
          opts.Cookie.HttpOnly = true;
          opts.Cookie.SecurePolicy = CookieSecurePolicy.Always;
          opts.Cookie.Domain = &quot;localhost&quot;;
          opts.Cookie.SameSite = SameSiteMode.Strict;
      });
  </code></pre>
  <p>But even after I set secure policy, there are no changes on my cookies:
  <a href="https://i.stack.imgur.com/445Md.png" rel="nofollow noreferrer">Antiforgery cookies not secured</a>, browser connection is secured (https).</p>