title: How to grant access to only the routes defined?
body: <p>I have the following code defined in Startup.cs:</p>
  
  <pre><code>services.AddMvc().AddRazorPagesOptions(options =&gt;
  {
      options.Conventions.AddPageRoute("/ListVehicles", "/vehicle-list");
  });
  </code></pre>
  
  <p>How do I only allow access to the page by using the url "vehicle-list" instead of just typing the cshtml file name ListVehicles in the url? I tried options.Conventions.Clear() but that didn't work.</p>