title: How to enable https in mvc6
body: <p>How I tried to do this:</p>
  
  <p>1- Set filter in startup:      </p>
  
  <pre><code>     public IServiceProvider ConfigureServices(IServiceCollection services)
         {
          //...
          services.AddMvc();
          services.Configure&lt;MvcOptions&gt;(options =&gt;
          {
              options.Filters.Add(new RequireHttpsAttribute());
          });
  </code></pre>
  
  <p>2- set  [RequireHttps] in cotroler</p>
  
  <pre><code>[RequireHttps]
  public class HomeController : BaseController
  {
      public ViewResult Index()
      {
          return View();
      }
   }
  </code></pre>
  
  <p>3- add in project.json</p>
  
  <pre><code> "kestrel": "Microsoft.AspNet.Hosting --server=Microsoft.AspNet.Server.Kestrel --server.urls=https://localhost:1234"
  </code></pre>
  
  <p>And still not working.
  What have I done wrong?</p>