title: Asp.Net Core cookie authentication options login path is routed via HTTP
body: <p>The below portion of my startup.cs shows that I am using cookies based authentication. The option for "LoginPath" is utilized when an unauthenticated user tries to hit a resource that is protected. The problem is that this is done via HTTP. I want the resultant response/redirect to the login page to be HTTPS.   </p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
      {
          services.AddSingleton&lt;IConfiguration&gt;(Configuration);
          services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
              .AddCookie(options =&gt;
              {
                  options.LoginPath = "/login";
                  ....
  </code></pre>
  
  <p>I tried to hard code the LoginPath so that it would be forced to go through an HTTPS path, but I found that that option must be a relative path.</p>
  
  <p>There is a downstream process (server/load balancer/something) which I have no power or viewership of that does a redirect to HTTPS, but this is not before the HTTP response occurs. I don't want that downstream process to have to handle the HTTP request. I would prefer this were handled in the application. </p>